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
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 |
can any give an exact example about, resolving the sql errorcode -305
computer is male or female.....???
i want what are the subjects that are in group1 exams. plz send me the subjects.
I want to join for load runner training..please suggest me which is the best institute for load runner training in bangalore?
what is total power generation capacity in india at present (as on 12-12-2011)
write a pgm to accept an array of names & name & check whether the name is present in the array. return the count of occurance. use following array as input; {"Dave","Ann","dev","merry"}
out of fgets() and gets()which function is safe to use and why in c language?
Client server applications
Give a brief description of the following terms: a) Play head b) Symbol c) Tweening d) ActionScript e) Frame rate f) Library panel g) Masking h) Context – sensitive Property Inspector i) Bandwidth Profiler j) Frame Label
verbal quiz and answers
what are the different types of datasets? what are their characteristics and properties? what are the advantages and disadvantages over others?.
what is the best thing in engineering?
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)