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 anyone help me with an article or a few pointers on what are the industry expectations from Fresh engineers in today's market scenario
who are egoless programmers?
what is a structure in c language?
explain overloaded constrator © constractor
Please can any tell what is the difference between method overloading and overriding in c#.net ?
what is inheritance
MILITARY ENGINEER SERVICES
a book consists of chapter ,chapter consist of sections and sections consists of subsections.construct a tree and print the node.
why one should join accenture?
performance test required for a automatic bank teller?
What are the main differences between Exchange 5.5 and Exchange 2000/2003?
What questions and tests would i be given to becme a service enginner 2 for a train company repairing trains
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)