#include<stdio.h>
main()
{
int a=1;
int b=0;
b=++a + ++a;
printf("%d %d",a,b);
}
Answer Posted / anand
answer should be 3 5
b = 2 + 3
b = ++a + ++a
here the compiler will work as below
b = ++a + 2
thn
b = 3 + 2
thn
b = 5
| Is This Answer Correct ? | 9 Yes | 10 No |
Post New Answer View All Answers
How is = symbol different from == symbol in c programming?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
What is header file in c?
Explain what is the use of a semicolon (;) at the end of every program statement?
Write a Program to find whether the given number or string is palindrome.
When should you use a type cast?
Which is better between malloc and calloc?
What does %c do in c?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Differentiate between the = symbol and == symbol?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
What is a static function in c?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
What does char * * argv mean in c?
What do you understand by normalization of pointers?