study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above

Answers were Sorted based on User's Feedback



study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / jitendra kumar arya

(d),because n treat as a chracter.
ans is 100n ,101n

Is This Answer Correct ?    1 Yes 3 No

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / sundar

the output is

a=100n(*p)=101n

Is This Answer Correct ?    0 Yes 2 No

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / venkataramani kumar.t.b.

The Answer is C) a=101 and (*p)=101.

Since the variable is not directly accessed and it
increments thru' the pointer, so the answer is valid

Is This Answer Correct ?    2 Yes 5 No

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / sathya.r

Ans: 100,100

Is This Answer Correct ?    1 Yes 4 No

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / manoj

B)100,100

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More C Interview Questions

How can I read and write comma-delimited text?

0 Answers  


What is the use of bitwise operator?

0 Answers  


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

0 Answers  


Which header file is used for clrscr?

0 Answers  


The file stdio.h, what does it contain?

0 Answers  






How to add two numbers with using function?

2 Answers   Miracle Solutions,


What is a macro in c preprocessor?

0 Answers  


1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

1 Answers  


What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }

8 Answers   ADITI, Adobe,


How would you sort a linked list?

1 Answers  


What is extern variable in c with example?

0 Answers  


b) 4 c) 6 d) 7 32. Any C program a) must contain at least one function b) need not contain ant function c) needs input data d) none of the above 33. Using goto inside for loop is equivalent to using a) continue b) break c) return d)none of the above 34. The program fragment int a=5, b=2; printf(“%d”,a+++++b); a) prints 7 b)prints 8 c) prints 9 d)none of the above 35. printf(“ab” , “cd”,”ef”); prints a) ab abcdef c) abcdef, followed by garbage value d) none of the above 36. Consider the following program segment. i=6720; j=4; while((i%j)==0) { i=i/j; j=j+1; } On termination j will have the value a) 4 b) 8 c) 9 d) 6720

1 Answers   HCL,


Categories