#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


Please Help Members By Posting Answers For Below Questions

Explain what is the use of a semicolon (;) at the end of every program statement?

728


Explain 'far' and 'near' pointers in c.

701


How can I automatically locate a programs configuration files in the same directory as the executable?

625


we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above

632


What is volatile variable in c with example?

581






What is difference between class and structure?

568


What is s or c?

590


Explain what is the difference between functions getch() and getche()?

601


What are enums in c?

655


What is the maximum no. of arguments that can be given in a command line in C.?

664


Write a program to find factorial of a number using recursive function.

639


What is a spanning Tree?

947


What is null pointer constant?

592


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

725


please explain every phase in the "SDLC" in the dotnet.

2175