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
What will be output if you will compile and execute the following c code?
int main() { int a=5; float b; printf("%d",sizeof(++a+b)); printf(" %d",a); return 0; }
2 6
4 6
2 5
4 5
What will be output if you will compile and execute the following C code?
int main(){ int check=2; switch(check){ case 1: printf("D.W.Steyn"); case 2: printf(" M.G.Johnson"); case 3: printf(" Mohammad Asif"); default: printf(" M.Muralidaran"); } return 0; }
M.G.Johnson
M.Muralidaran
M.G.Johnson Mohammad Asif M.Muralidaran
Compilation error
How many times "IndiaBIX" is get printed?
int main() { int x; for(x=-1; x<=10; x++) { if(x < 5) continue; else break; printf("IndiaBIX"); } return 0; }
Infinite times
11 times
0 times
10 times
cmp is a pointer to an void type.
cmp is a void type pointer variable.
cmp is a function that return a void pointer.
cmp function returns nothing.
switch
goto
go back
return
All of them let you define new values
All of them let you define new data types
All of them let you define new pointers
All of them let you define new structures
int a(char *s)
void b(int a[], int n)
float *c()
short d(long x)
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
What will be the output of the following code segment?
Structured Programming
tured Programming
ctured Programming
There will be no output as there is a syntax error in code
Consider the statement given below:
printf("%d ", *(p + 3));
printf("%d", p[4]);
printf("%d ", a + 3);
printf("%d ", *a + 3);
int x = 24, y = 39, z = 45; z = x + y; y = z - y; x = z - y; printf("\n%d %d %d", x, y, z);
24 39 63
39 24 63
24 39 45
39 24 45
int a[ ][4];
int b[2, 4];
int c[2][ ];
int d[ ] [ 4] = {{1, 3, 5, 7}, {2, 4, 6, 8}};
What will be the output of the following code segment if Hello there is given as input?
Hello there
Hello
"Hello there"
"Hello"
10 10
11 11
11 12
12 12