NEW
Font size
WorksheetsCompro. Final 1/64 part1
Total questions: 25
Worksheet time: 1hrs 27mins
A pointer is
a variable that stores an address
one of the C keywords
a pre-processor directive
a C string
Skip
What is the correct explanation of this C code “int *ptr[20]”.
An array of 20 pointers to int
A pointer to an array of 20 ints
20 int pointers to an array
20 arrays of a pointer to int
Skip
Choose an invalid C code
int *A = NULL;
int *A[20][20];
int *A[20] = NULL;
int (*A)[20] = NULL
skip
What will be printed on screen from the following C code?
140 140
2 140
100 140
140 100
skip
What will be printed on screen from the following C code?
140 140
2 140
100 140
140 100
skip
What will be printed on screen from the following C code?
140 140
2 140
100 140
140 100
What will be printed on screen from the following C code?
140 140
2 140
100 140
140 100
skip
What is the result of line number 13?
16.00
26.00
31.00
10.50
skip
What is the result of line number 13?
4.00
8.00
16.00
20.00
skip
What is the result of line number 12?
5
10
15
25
skip
What will be the output of the following C code?
Welcome to my function
0
Welcome to my function 0
Compile error
skip
What will be the output of the following C code?
function1function1
10
Hello!Hello!
Compile Error
skip
What will be the output of the following C code?
0 1 2
0 2 4
0 3 5
0 5 10
skip
What are the correct output of out1 and out2 for this code?
out1 = 10, out2 = 75
out1 = 7, out2 = 13
out1 = 1, out2 = 1
out1 = 0, out2 = 0
skip
What are the correct output of out1 and out2 for this code?
out1 = 0, out2 = 2
out1 = 2, out2 = 4
out1 = 4, out2 = 8
out1 = 0, out2 = 0
skip
Which choice is correct about function topic?
Main function is a user-defined function.
Return value is the most important thing for user-defined function.
Function declaration is not necessary, in case of user-defined function is above main function.
User-defined function is the main function.
skip
What will be the output of the following C code?
Result is 0
Result is 4
Result is 0, 4
Result is 4, 0
skip
Which is possible for function declaration for line 3?
int average(int arr[]);
void average(float arr[]);
float average(int arr[]);
int average(void);
skip
What is the result of line 12?
5, 5
5, 10
5, 6
5, 0
skip
What will be the output of the following C code?
m = 5, n = 1
m = 1, n = 5
m = x, n = y
Compile error
skip
Which of the following file modes opens a file in the write state for updating?
ab
rb
r+b
wb
skip
What is in the file SAMPLE.DAT after running the program?
Nothing
12345
ABCDE
Error to run
skp
Which of the following statements about files is true?
All files must be opened before they can be used.
Binary files are more portable than text files.
Binary files are slower than text files.
Files must be closed.
skip
Choose an incorrect statement about C file operation program?
FOPEN opens a file named readme.txt in Read Mode.
EOF is End Of File. ch==EOF checks for end of file and while loop stops or exits.
FGETC(fp) is a function that returns one character and cursor goes to next character.
EOF is a new line checking.
skip
If a FILE pointer is NULL what does it mean?
Unable to open a file named abc.txt
abc.txt is not available on disk
Hard disk has hardware problems.
All the above
skip
