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 |
hi i am an CSE engg student and i cleared the PE exam of BEL 2012 both 24/07/012 and 01/08/2012 , so please if someone can help me with PE Interview question or subject or topics which i should cover that help me clear both Interview.PLZ help. my mail id is rjjkumar99@gmail.com
how to increase the chiller effiency?
Write a program using string fuctions that accepts a price of an item and display its coded value. The base of the key is: X c o m p u t e r s 0 1 2 3 4 5 6 7 8 9
List three things you can do with the files you create by recording your voice on your computer
in header files whether functions are declared or defined in c language?
plz explain abt refrigeration r22 bitzer comprassors trouble shooting and maintenance
what is a pointer in c language?
What type of questions are asked in interview?
hey frnds..i have taken an emergency interview date of 21st july and my school is starting from 8th sept...i was continuously checking the date from 10 days but was not able to get a normal date...so can i get a rejection on this, that i have taken an emergency date.??????
who is your favourate actor in tollywood tellme about him in few points
why dijkstra algorithm not used for negative weighted edges graph??
can you provide me uniken pvt ltd. technical interview question and answer?