#include<stdio.h>
main()
{
int a=1;
int b=0;
b=++a + ++a;
printf("%d %d",a,b);
}
Answer Posted / banavathvishnu
let consider the statement
b = ++a + ++a;
++a will be 2
++a again will be 3
now replace its value in the expression
b = a + a = 3+3=6
hence a is 3 and b is 6
| Is This Answer Correct ? | 26 Yes | 12 No |
Post New Answer View All Answers
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
how logic is used
Explain low-order bytes.
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What is the function of multilevel pointer in c?
How many data structures are there in c?
What does sizeof function do?
What do you mean by dynamic memory allocation in c?
What are control structures? What are the different types?
Why c is called procedure oriented language?
What do you mean by dynamic memory allocation in c? What functions are used?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
Explain what is the most efficient way to store flag values?
What does s c mean in text?
What is a example of a variable?