find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}

Answer Posted / rahul khare

6
becoz it(++*p) will evaluate like this-
1)
*(p)- gives value at this address that is 5
2)
now increment ++5
that is 6.

Is This Answer Correct ?    37 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how we can make 3d venturing graphics on outer interface

3996


How can I prevent another program from modifying part of a file that I am modifying?

606


What is character set?

681


What is the difference between memcpy and memmove?

597


write a program to rearrange the array such way that all even elements should come first and next come odd

1756






the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

754


If null and 0 are equivalent as null pointer constants, which should I use?

574


How to explain the final year project as a fresher please answer with sample project

463


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

3728


What is the difference between char array and char pointer?

525


Is c high or low level?

577


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

608


How can you check to see whether a symbol is defined?

585


How to write a code for reverse of string without using string functions?

1575


What is static volatile in c?

572