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

Answers were Sorted based on User's Feedback



What will be the output of the following program : void main() { int a,b,c; ..

Answer / 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

What will be the output of the following program : void main() { int a,b,c; ..

Answer / sanchit

none of these

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More Engineering AllOther Interview Questions

what are the difference between grounding,earthing and neutral???????....

1 Answers  


assemblies in .net

0 Answers  


discus the worst and best case complexity of binary search

0 Answers  


Given a passport size photo draw vertical and horizontal lines and mark the intersection points(assume one for the photo and zero for the background).Give the intersection points(1 or 0) to program and print "." for input 1.

1 Answers  


explain various object oriented programming fetures

0 Answers  


can u tell me what are the subjects involved in group I and II and how i prepare for the exam

0 Answers  


i m a student of 4th year ,i m unable to get the embassy appointment dates , and it details.............please help any body.My id=john_searching143@yahoo.com

0 Answers  


tcs aptitude questions

1 Answers   TCS,


what is the different between view and materialized view in oracle DBA?

0 Answers   Wipro,


WHAT IS THE DIff Between candidate key and primary key?

0 Answers  


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.

0 Answers  


Why you shifting job every other year?

1 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4456)
  • Electrical Engineering Interview Questions Electrical Engineering (16639)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)