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 |
What are the features of tata nano , technical specification of tata nano, overview of tata nano, varients of tata nano, price of tata nano, dealers of tata nano, expectation from tata nano, criticism of tata nano, tata nano hybrid ?
How can I boldly face the interview? Request:I am eagerly waiting for your replay.
Q1 Design a webpage for a hotel which displays all the information of the hotel such as rooms available, facilities, and packages along with rate list. Apply the different tags available to give it a good style.
how to hack email id & passward
how to count 4 column with two "and" condition in oracle? e.g task_type and cust_type and service_type are 3 column and we hv to count where task_type="new"and cust_type="jdp" and resulting column name will be new cust with jdp..and also we hv to count where task_type="new"and service_type="fs" resulting column name will be new cust with fs..
What do you mean by component versionig?
I am from B.Tech back ground, i had Applied to do masters in Engineering management, and university gave Admission and sent I-20, if the interviewer asks why are doing masters in this field, even you are from B.Tech (information technology)? Can any one give me relevant answer, if interviewer asks that question
Let an denote the number of bit strings of length n that do not have two consecutive zeroes. Find a recurrence relation for the number of bit strings of length n that do not have two consecutive zeroes. Hence find a4.
a steel bar 1' inch square 6' long is to be used as a column.ends are free to rotate put may not be displaced.stress is limited to 30,000 PSI
What are special features of Silk Test ? In what way it is advanced than QTP?
Explain what are db_options used for?
What is the strongest naturally occurring material and how can it be cut?