题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-15 04:36:44

[单项选择]在Shell脚本中,用来读取文件内各个域的内容并将其赋值给Shell变量的命令是______。
A. fold
B. join
C. tr
D. read

更多"在Shell脚本中,用来读取文件内各个域的内容并将其赋值给Shell变"的相关试题:

[简答题]函数ReadDat( )实现从文件in.dat中读取一篇英文文章并将其存入到字符串数组xx中。请编制函数StrOL( ),其函数的功能是:以行为单位对行中以空格或标点符号为分隔的所有单词进行倒排。最后把已处理的字符串(应不含标点符号)仍按行重新存入字符串数组XX中,最后调用函数WriteDat( )把结果xx输出到文件out.dat中。
例如:原文:You He Me
I am s student.
结果:Me He You
student a am I
原是数据文件存放的格式是:每行的宽度均小于80个字符,含标点符号和空格。
注意:部分源程序给出如下:
请勿改动主函数main( )、读数据函数ReadDat( )和输出数据函数WriteDat( )的内容。
[试题源程序]
#include<stdio h>
#include<string.h>
#include<conio.h>
#include<ctype h>
char xx[50][80];
int maxline=0;/*文章的总行数*/
int ReadDat(void);
void WriteDat(void);
void StrOL(void)


void main( )

system("cls");
if(ReadDat( ))

printf("数据文件IN.DAT不能打开!/n/007");
return;

StrOL( );
WriteDat( );

int ReadDat(void)

FILE*fp;
int i=0;
char*P;
if((fp=fopen("IN DAT","r")==NULL)return 1;
while(fgets(xx[i],80,fp)!=NULL)

P=strchr(xx[i],’/n’);<
[多项选择]函数ReadDat( )可以从文件IN.DAT中读取一篇英文文章并将其存入字符串数组xx中。请编制函数StrOL( ),其功能是:以行为单位对行中以空格或标点符号为分隔的所有单词进行倒排,然后把已处理的字符串(不含标点符号)仍按行重新存入字符串数组xx中,最后调用函数writeDat( ),把结果xx输出到文件OUT.DAT中。
例如,原文:
You He Me
I am a student.
结果:
Me He You
student a am I
原始数据文件的格式是:每行的宽度均小于80个字符,含标点符号和空格。
注意:部分源程序给出如下。
请勿改动主函数main( )、读数据函数ReadDat( )和输出数据函数WriteDat( )的内容。
[试题源程序]
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<ctype.h>
char xx[50][80];
int maxline=0;/*文章的总行数*/
int ReadDat(void);
void WriteDat(void);
void StrOL(void)


void main( )

system("cls");
if(ReadDat( ))

printf("数据文件IN.DAT不能打开!/n/007");
return;

StrOL( );
WriteDat( );

int ReadDat(void)

FILE *fp;
int i=0;
char *p;
if((fp=fopen("IN.DAT","r"))==NULL) return 1;
while(fgets(xx[i],80,fp)!=NULL)

p=strchr(xx[i],’/n’);
if(p) *p=0;
i++
[简答题]函数ReadDat( )用于实现从文件ENG.IN中读取一篇英文文章,并将其存入字符串数组xx中。请编制函数encryptChar( ),按给定的替代关系对数组xx中所有的字符进行替代,结果仍存入字符串数组xx的对应位置,最后调用函数WriteDat( )把结果数组xx输出到文件PS3.DAT中。
替代关系:f(p)=p*17 rood 256(p是数组中某一个字符的ASCⅡ值,f(p)是计算后新字符的ASCⅡ值)。如果计算后f(p)的值小于32或其ASCⅡ值是奇数,则该字符不变,否则将f(p)所对应的字符进行替代。
原始数据文件的格式为:每行的宽度均小于80个字符。
注意:部分源程序给出如下。
请勿改动主函数main( )、读数据函数ReadDat( )和输出数据函数WriteDat( )的内容。
[试题源程序]
#include<Stdio.h>
#include<string.h>
#inciude<conio.h>
#include<ctype.h>
unsigned char xx[50][80];
int maxline=0; /*文章的总行数*/
int ReadDat(void);
VOid WriteDat(void);
void encryptChar( )


void main( )

system("cls");
if(ReadDat( ))

printf("数据文件ENG.IN不能打开!/n/007");
return;

encryptChar( );
WriteDat( );

int ReadDat(void)

FILE *fp;
int i=0;
unsigned char *P;
if((fp=fopen("eng.in","r"))==NULL) return 1;
while(fgets(xx[i],80,fp)!=NULL)

p=strchr(xx[i],’/n’
[简答题]试题内容
将页脚中的图形另存为构建基块,将构建基块命名为“汽车”,然后将其保存到页脚库中。
准备
打开练习文档(/Word素材/7汽车.docx)。
注释
本题考查文档部件库的管理功能。在“插入”选项卡的“文本”组群中,单击“文档部件”按钮,然后单击“将所选内容保存到文档部件库”。在将所选内容保存到文档部件库后,可以通过“文档部件”按钮从库中选择相应内容来重复使用。
[判断题]集水器是用来收集水平干管内的凝结水和油分,并将其定期排除的装置。配管时,与集水器连接的支立管应从干管上端接出。( )
[填空题]
下面的短文有5处空白,短文后有6个句子,其中5个取自短文,请根据短文内容将其分别放回原有位置,以恢复文章原貌。
{{B}} Mind Those Manners on the Subway{{/B}}
So, there you are, just sitting there in the subway car, enjoying that book you just bought.{{U}} (46) {{/U}}Or, the person sitting next to you takes out a nail clipper (指甲刀) and begins cutting his or her nails.
Annoying Many of us have to spend some time every day on public transportation.{{U}} (47) {{/U}}So, to make the trip more pleasant, we suggest the following:
Let passengers get off the bus or subway car before you can get on.{{U}} (48) {{/U}}
Stand away from the doors when they are closing.
Don’t talk loudly on a bus or subway. Chatting loudly with your friends can be annoying to others. {{U}} (49) {{/U}}
Don’t think your bags and suitcases (手提箱) deserve a seat of their own.
Use a tissue whenever you cough or sneeze (打喷嚏). An uncovered sneez
[填空题]
下面短文有5处空白,短文后有6个句子,其中5个取自短文,请根据短文内容将其分别放回原有位置,以恢复文章原貌。
Technology in Our Modern Lives

Throughout the 20 century, from 1900 onwards, people have dreamt of the technological advances that the advent of the new millennium(千禧年) would bring. {{U}} (46) {{/U}}The year 2000 has now come and gone and while flying cars are still left to the realm of the imagination, the infusion(注入) of technology into all areas of life has indeed become a reality.
Leading the technological change is the ever-present computer. In the United States, fully one-half of all households are connected to the Internet, and the pace is rapidly increasing, with 700 more households becoming connected every hour. The computer industry has produced over one million new jobs, spurring rapid and unprecedented(前所未有的)growth in economic output and prosperity.{{U}} (47) {{/U}}In 1999, 27% of companies monitored(监视) their employee

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码