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 to compare two strings without using strcmp() function??

1 Answers  


For what purpose null pointer used?

0 Answers  


What is wrong with this program statement? void = 10;

0 Answers  


WAP TO ACCEPT STRING AND COUNT A COMES N TIMES B COMES N TIMES C COMES N TIMES D COMES N TIMES AND SO ON......... AT LAST UNTIL Z COMES N TIMES...............

3 Answers  


WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?

28 Answers   3D PLM, Code Studio, Deltech, IBM,






How do you list a file’s date and time?

0 Answers  


void main() { int x=25,y=32; clrscr(); x=x++ + y++; y=++x + ++y; printf("%d%d",x,y); }

5 Answers  


What is gets() function?

0 Answers  


If the static variable is declared as global, will it be same as extern?

1 Answers   Samsung,


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

0 Answers  


Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack

3 Answers  


What is the best way of making my program efficient?

0 Answers  


Categories