Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 / santhoo035

d)None of the above
It will give compliation error at the line p=&a,pointer to
integer cannot assign to const int

Is This Answer Correct ?    18 Yes 1 No

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

Answer / guest

D)

Is This Answer Correct ?    6 Yes 0 No

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

Answer / hima bindu sudhani

The answer is A)100, 101

Is This Answer Correct ?    6 Yes 2 No

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

Answer / madhu

D) NONE OF THE ABOVE
COZ
ANS IS A=101n (*p)=101n
to get this *p should be an constant pointer

Is This Answer Correct ?    3 Yes 1 No

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

Answer / sridevi.halli

answer is d)none of the above
bcoz in line p=&a it will gve error

Is This Answer Correct ?    2 Yes 0 No

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

Answer / abdur rab

the answer is c) 101, 101

a constant variable can be accessed using a pointer to
change the value because, during compilation the compiler
cannot see that the pointer is changing a contant read only
variable.

the same method can be applied over the private members in
a c++ class also.

Is This Answer Correct ?    3 Yes 1 No

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

Answer / y hussain reddy

101 ,101

Is This Answer Correct ?    0 Yes 0 No

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

Answer / traphunter

a=101n(*p)=101n

answer c)

Is This Answer Correct ?    0 Yes 0 No

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

Answer / divakar

ouput will be c)a=101 (*p)=101

Is This Answer Correct ?    1 Yes 2 No

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

Answer / biranchi ranjan parida

none of the above
pointer value of address increases it cant store its
original value

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;

5 Answers   Assurgent, TCS,


Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile?

4 Answers   Oracle,


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include<stdio.h>...

0 Answers  


Explain what is operator promotion?

0 Answers  


What is function pointer c?

0 Answers  


What are the disadvantages of a shell structure?

0 Answers  


what is answer for perfect number????????????????

1 Answers  


write a program that will accept two integers and will implement division without using the division operator if the second value is an odd number and will implement multiplication without using multiplication operator if the second value is an even number.

1 Answers  


c program to manipulate x=1!+2!+3!+...+n! using recursion

1 Answers   TCS,


change to postfix a/(b+c*d-e)

8 Answers   Value Labs,


Can a pointer be static?

0 Answers  


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

5 Answers  


Categories