Search results for programming-in-c+gate

13 votes
8 answers
2
If n has 3, then the statement a[++n]=n++;assigns 3 to a[5]assigns 4 to a[5]assigns 4 to a[4]what is assigned is compiler dependent
2 votes
2 answers
5
0 votes
1 answer
6
The minimum size of stack required to evaluate given post fix expression is _____________postfix :- 2 5 x 6 + 4 2 x - MY ANSWER IS 8..CAN ANYONE TELL ME WHERE I AM WRONG�...
21 votes
1 answer
7
What will be the output of the following code?#include<stdio.h int main() { int x=10, y; y = (x++) + (++x); printf("%d %d %d %d ", y, x++, x, ++x); }22,10,11,1322,11,11,1...
2 votes
1 answer
8
2 votes
1 answer
11
#include<stdio.h int main() { int x=191; char *p; p=(char*)&x; printf("%d",*p); }explain it
1 votes
1 answer
12
which function will going to be call first?x = f1() + f2()is it compiler dependent ?
1 votes
1 answer
13
main(){int a;scanf("%i"&a);printf("%i %d",a,a);scanf("%d",&a);printf("%i %d",a,a);}suppose user entered 0101 as input .what is printed by above program?
2 votes
1 answer
14
Q1)Output with explanationLong int a = scanf("%Id %Id",&a,&a);Printf("%id",a);(A) error(B) garbage value(C) zero(D) 2
0 votes
1 answer
16
main(){int a;scanf("%i"&a);printf("%i %d",a,a);scanf("%d",&a);printf("%i %d",a,a);}suppose user entered 0x56 as input .what is printed by above program?
1 votes
1 answer
17
#include <stdio.h int main(void){ int i=511; char *p = (char *)&i; printf("%d", *p); }OK so why take 2's complement and not simple binary number? Means, why is C giving -...
5 votes
3 answers
18
Will it result in to an error if a header file is included twice?[A].Yes[B].No[C].It is compiler dependent
2 votes
6 answers
20
what is the o/p #include<stdio.h void main() { int a=5; printf("%d %d %d",a++,++a, a); }also suggest me notes so i can clear my concept about printf function (For Gate)