Q 1 - What is the output of the below code snippet?
#include<stdio.h> main() { for(1;2;3) printf("Hello"); }
Answer : A
Q 2 - What is the output of the following program?
#include<stdio.h> main() { printf("\"); }
Answer : D
Q 3 - Identify the invalid constant used in fseek() function as ‘whence’ reference.
Answer : C
Q 4 - What is the output of the following program?
#include<stdio.h> main() { char *s = "Hello, " "World!"; printf("%s", s); }
Answer : A
Q 5 - What is the output of the following program?
#include<stdio.h> void main() { char *s = "C++"; printf("%s ", s); s++; printf("%s", s); }
Answer : B
Q 6 - How do you specify double constant 3.14 as a long double?
Answer : B
Q 7 - The given below program allocates the memory, what function will you use to free the allocated memory?
#include<stdio.h> #include<stdlib.h> #define MAXROW 4 # define MAXCOL 5 int main () { int **p, i, j p = (int **) malloc(MAXROW * sizeof(int*)); return 0; }
D - Both, free(p); & dealloc(p);
Answer : B
Q 9 - An operation with only one operand is called unary operation.
B - An operation with two operand is called unary operation
C - An operation with unlimited operand is called unary operation
Answer : A
Q 11 - What is the output of the below code snippet?
#include<stdio.h> main() { for(1;2;3) printf("Hello"); }
Answer : A
Q 12 - What is the output of the following program?
#include<stdio.h> main() { printf("\"); }
Answer : D
Q 13 - Identify the invalid constant used in fseek() function as ‘whence’ reference.
Answer : C
Q 14 - What is the output of the following program?
#include<stdio.h> main() { char *s = "Hello, " "World!"; printf("%s", s); }
Answer : A
Q 15 - What is the output of the following program?
#include<stdio.h> void main() { char *s = "C++"; printf("%s ", s); s++; printf("%s", s); }
Answer : B
Q 16 - How do you specify double constant 3.14 as a long double?
Answer : B
Q 17 - The given below program allocates the memory, what function will you use to free the allocated memory?
#include<stdio.h> #include<stdlib.h> #define MAXROW 4 # define MAXCOL 5 int main () { int **p, i, j p = (int **) malloc(MAXROW * sizeof(int*)); return 0; }
D - Both, free(p); & dealloc(p);
Answer : B
Q 19 - An operation with only one operand is called unary operation.
B - An operation with two operand is called unary operation
C - An operation with unlimited operand is called unary operation