Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What will be the output of the following program :
void main()
{
int a,b,c;
scanf("%1d %2d %3d",&a,&b,&c);
printf("Sum=%d",a+b+c);
}
[NOTE : THE USER INPUT IS :123456 44 544]
(a)Sum=480 (b)Sum=594 (c)Sum=589 (d)None of these

Answer Posted / ravinder

The answer is 480
Here it takes the first number as string
for %1d it takes first number 1 from 123456
for %2d it takes next two numbers 23 from 123456
for %3d it takes the remaining 456 from 123456
so sum is 1
23
456
----
480

Is This Answer Correct ?    13 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i want questions only on code part like general logics in c and java

1814


how do we calculate physical address if logical address is given in the question?

2878


where is the first engeenering college of Asia

1941


5. Can you work well under deadlines or pressure?

2618


what are nanoemulsions and how are they prepared? i want a brief outline about nanoemulsions.. is anyone of you is having any literature, can you share that? also any an idea where i can get the information?

1934


3. Tell me about a time when you had too many things to do and you were required to prioritize your tasks.

2028


Is there any difference between the concepts of encoding,decoding and encryption and decryption?

2155


what is program data insulation in dbms?

2300


what is elligibility criteria of hcl?

2258


WHAT HAPPEN WHEN ANY SPINDLE RUN OVER 10 MM HEIGHT ABOVE BOLSTAR IN RING SPINNING FRAME

1796


i m doing engg in IT .for getting job which courses i have to do?

1965


how strcpy usingrecursive function

2008


write a program for reverse a given string?

2018


minimum percentage in B.E in(INFORMATION TECHNOLOGY) to be eligible for IES exam qualification and also for reserved categories.are IT engineers are eligible for giving IES exams? please reply soon.

2337


Write a c pgm to print the letter as per given condition i.e.. if u give 4 out put should b 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

1939