#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
Do pointers take up memory?
What is pragma c?
What is meant by 'bit masking'?
What is calloc malloc realloc in c?
Explain about C function prototype?
How #define works?
What are operators in c?
Can a pointer point to null?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
How to write c functions that modify head pointer of a linked list?
Which is better between malloc and calloc?
How are structure passing and returning implemented?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What is the use of #define preprocessor in c?