When the following piece of code is executed, what happens?
b = 3; a = b++;
a contains 3 and b contains 4
a contains 4 and b contains 4
a contains 4 and b contains 3
a contains 3 and b contains 3
What is the value of r after this code is executed?
r=2; k=8; if (r>3 || k>6 && r<5 ||k>10) r=9; else r=6
9
2
6
8
<
=
>=
<=
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
0
1
Id_No
ID_NO
IdNo
Id No
What will be the output of the following program?
main() { int x = 5; while ( x = = 1) x = x -1; printf ( “ %d\n”, x); }
5
4
syntax error
auto
dec
static
extern
int *int(a);
int *x, *y;
float *aptr;
int *x; float *y;
P
O
R
None of the above
one word at a time on the screen
one character at a time
result on the screen
power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
-4
-2.8
+2.8
+3
1return
return1
return
$return_1
“programming Trick”
“programming"
‘programming'
$ programming $
remove(var-name);
free(var-name);
delete(var-name);
dalloc(var-name);
-5
+5
Pointer
Array
Function
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
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++