#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


Please Help Members By Posting Answers For Below Questions

What is a static variable in c?

667


Write a program to print fibonacci series using recursion?

585


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

651


What are the types of data types and explain?

667


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

9656






Tell me what is null pointer in c?

615


Which header file is used for clrscr?

580


Can 'this' pointer by used in the constructor?

610


Why c is called a mid level programming language?

605


What is wrong with this program statement?

610


What is the process to generate random numbers in c programming language?

608


what is event driven software and what is procedural driven software?

2015


How can I use a preprocessorif expression to ?

601


Why c is known as a mother language?

644


Can we change the value of constant variable in c?

572