find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
Answer Posted / manishsoni
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
it allocate as this
____ _____
x| |value p | | store &x
| 5 | | 100 |
|____| |_____|
____ _____
|100 |&x | 200 |&p p is pointer //at statement ++*p
|____| |_____|
^ ^
|________________|
and jumpt at 5 bcoz it is prefix for firstof all 5 is
increase then print
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What is wrong in this statement?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What does 2n 4c mean?
How do you determine a file’s attributes?
What are the 4 types of unions?
What are the advantages of using linked list for tree construction?
What is the difference between malloc() and calloc() function in c language?
How can you call a function, given its name as a string?
What is variable declaration and definition in c?
What is function and its example?
what are # pragma staments?
What are the modifiers available in c programming language?
What are nested functions in c?
Explain how do you determine a file’s attributes?
What is the use of bitwise operator?