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...


void main()

{

int const * p=5;

printf("%d",++(*p));

}

Answers were Sorted based on User's Feedback



void main() { int const * p=5; printf("%d",++(*p)); }..

Answer / susie

Answer :

Compiler error: Cannot modify a constant value.

Explanation:

p is a pointer to a "constant integer". But we
tried to change the value of the "constant integer".

Is This Answer Correct ?    79 Yes 10 No

void main() { int const * p=5; printf("%d",++(*p)); }..

Answer / mahe

5
pointer value does not change.so print thier value

Is This Answer Correct ?    3 Yes 8 No

void main() { int const * p=5; printf("%d",++(*p)); }..

Answer / jambalakadi pamba

here...p is a pointer which is pointing to a addresss which is constant....!!! so the output is 6

Is This Answer Correct ?    8 Yes 22 No

Post New Answer

More C Code Interview Questions

To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

0 Answers  


main() { 41printf("%p",main); }8

1 Answers  


main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }

1 Answers  


main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 Answers  


main() { printf("%x",-1<<4); }

3 Answers   HCL, Sokrati, Zoho,


how can i cast a char type array to an int type array

2 Answers  


Link list in reverse order.

8 Answers   NetApp,


void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }

2 Answers  


how to check whether a linked list is circular.

11 Answers   Microsoft,


To reverse an entire text file into another text file.... get d file names in cmd line

0 Answers   Subex,


void main() { int i=5; printf("%d",i++ + ++i); }

3 Answers  


Finding a number which was log of base 2

1 Answers   NetApp,


Categories