int i=10;
main()
{
extern int i;
{
int i=20;
{
const volatile unsigned i=30;
printf("%d",i);
}
printf("%d",i);
}
printf("%d",i);
}
Answer / susie
Answer :
30,20,10
Explanation:
'{' introduces new block and thus new scope. In the
innermost block i is declared as,
const volatile unsigned
which is a valid declaration. i is assumed of type int. So
printf prints 30. In the next block, i has value 20 and so
printf prints 20. In the outermost block, i is declared as
extern, so no storage space is allocated for it. After
compilation is over the linker resolves it to global
variable i (since it is the only variable visible there). So
it prints i's value as 10.
| Is This Answer Correct ? | 6 Yes | 8 No |
All the combinations of prime numbers whose sum gives 32
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
main() { clrscr(); } clrscr();
main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16
Write a routine to implement the polymarker function
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
Write a routine that prints out a 2-D array in spiral order
what is oop?