What does fp point to in the program?
int main() { FILE *fp; fp=fopen("trial", "r"); return 0; }
The first character in the file
A structure which contains a char pointer which points to the first character of a file
The name of the file
The last character in the file
A
B
ADA
C++
TRUE
FALSE
What is the output of the following code?
8 6 4 2
Infinite output
6 4 2 0
Invalid because main function can’t call itself.
What is the effect of the following code?
16 16
Syntax error because of invalid operator symbol
25 16
Syntax error because of invalid array initialization
What will be the output of the following code?
6
Invalid syntax because / * is used for comments.
8
IInvalid syntax because three binary operators can’t be together in an expression.
main() { int a, b; a=b=4; b=a++; printf("%d %d %d %d", a++, --b, ++a, b--); }
5 3 7 3
Syntax error
5 4 5 3
6 2 6 4
Compiler declare array name itself as a constant pointer to base address
A continuous file is allocated to store the elements value
Index of elements is declared automatically
All elements are initialized to zero
4, 4, 12
8, 2, 12
10, 4, 16
8, 4, 14