Index
=>
HCL ONLINE EXAM ETEST 2
Your score will be displayed while taking the exam itself. After finishing the ONLINE EXAM press index or => to go to the other etests. ALL THE BEST!
What is the output of the following program? main() { int x=20; int y=10; swap(x,y); printf("%d %d",y,x+2); } swap(int x,int y) { int temp; temp =x; x=y; y=temp; }
? 10,20 ? 20,12 ? 22,10 ? 10,22
What is the output of the following problem ? #define INC(X) X++ main() { int X=4; printf("%d",INC(X++)); }
? 4 ? 5 ? compilation error ? runtime error
what can be said of the following struct Node { char *word; int count; struct Node left; struct Node right; }
? Incorrect definition ? structures cannot refer to other structure ? Structures can refer to themselves. Hence the statement is OK ? Structures can refer to maximum of one other structure
main() { int i; char *p; i=0X89; p=(char *)i; p++; printf("%x\n",p); }
? ans:0X8A ? Runtime Error ? Compilation Error ? None
which of the following is not a ANSI C language keyword?
? int ? char ? float ? function
When an array is passed as parameter to a function, which of the following statement is correct
? The function can change values in the original array ? In C parameters are passed by value. The funciton cannot change the original value in the array ? It results in compilation error when the function tries to access the elements in the array ? Results in a run time error when the funtion tries to access the elements in the array
What is the value of the expression (3^6) + (a^a)?
? 3 ? 5 ? 6 ? none
What is the value assigned to the variable X if b is 7 ? X = b>8 ? b <<3 : b>4 ? b>>1:b;
? 1 ? 2 ? 3 ? 4
What is th output of the following program? int x= 0x65; main() { char x; printf("%d\n",x) }
? Compilation Error ? 3 ? 4 ? Unidentified
What is the output of the following problem ? #define INC(X) X++ main() { int X=4; printf("%d",INC(X++)); }
? 5 ? 4 ? 6 ? compilation error
Index
=>