Can someone help me with my C PROGRAMMING study guide... THANKS!! 1. The ____ fu
ID: 3694667 • Letter: C
Question
Can someone help me with my C PROGRAMMING study guide... THANKS!!
1. The ____ function call requires three arguments: an address where the first character read will be stored, the maximum number of characters to be read, and the name of the input file.
a. fgetc()
b. fgets()
c. fprintf()
d. fscanf()
2. int *ptNum = &miles; is ____.
a. always valid
b. never valid
c. only valid if miles is declared as an integer variable before ptNum is declared
d. only valid if miles is declared as an array of integers before ptNum is declared
3. The maximum allowable filename in current Unix versions is ____
a. 8 characters plus an optional period and 3-character extension
b. 14 characters
c. 155 characters
d. 255 characters
4. ____ shows a correct array initialization statement.
a. char codes[6] = ['s', 'a', 'm', 'p', 'l', 'e'];
b. char codes[] = ('s', 'a', 'm', 'p', 'l', 'e');
c. char codes[] = "sample";
d. char codes[*] = {'s', 'a', 'm', 'p', 'l', 'e'};
5. Each of the individual data items in a “structure” or single unit is an entity by itself that is referred to as a ____.
a. Record
b. Union
c. Data structure
d. Data field
6. T he statement ____ passes a copy of the structure member emp.idNum to a function named display().
a. display(*emp.idNum);
b. display(emp.idNum);
c. display(&emp.idNum);
d. display(emp->idNum);
7. If nums is a two-dimensional integer array, ____ refers to element nums[1][0].
a. *nums[1]
b. *nums[0]
c. *nums + 1
d. *nums++
8. The maximum allowable filename in the DOS operating system is ____.
a. 8 characters plus an optional period and 3-character extension
b. 14 characters
c. 155 characters
d. 255 characters
9. ____ creates an array of 10 PayRecord structures.
a. struct (PayRecord employee)[10];
b. struct[10] PayRecord employee;
c. struct PayRecord[10] employee;
d. struct PayRecord employee[10];
Explanation / Answer
1.b. fgets()
2.c. only valid if miles is declared
as an integer variable before ptNum
is declared
3.d. 255 characters
4.c. char codes[] = "sample"
5.d. Data field
6.b. display(emp.idNum);
7.a. *nums[1]
8.d. 255 characters
9.d.struct PayRecord employee[10];