#include<stdio.h>
main()
{
int a=1;
int b=0;
b=++a + ++a;
printf("%d %d",a,b);
}

Answer Posted / ashok

initially a=1,b=0
++a=2 //1+1=2
++a=3 //2+1=3
b=2+3=5
answer:a=3 b=5

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a lvalue

664


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

626


What is int main () in c?

623


code for quick sort?

1622


What are the key features in c programming language?

613






Which is better between malloc and calloc?

669


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

1507


Write a program to use switch statement.

658


Is c a great language, or what?

602


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2721


What is the difference between malloc() and calloc() function in c language?

602


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1699


What is the difference between int main and void main in c?

591


how to make a scientific calculater ?

1565


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

611