what will be the output of "printf("%d%d",scanf("%d%
d",&a,&b))".provide an explation regarding the question

Answer Posted / manish soni bca 3rd year jaipu

what is output of this program
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
a=10;
b=20;
printf("%d %d");
getch();
}

it gives the 20 10;
bcoz printf fn return which value,
read recently ,reversely.
so above question we easly explain.
that;-
so scanf fn return which value process it.
scanf fn return 2 and after return value of b.


manish soni bca 3rd year jaipur tagore college

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the auto keyword good for?

621


What are Macros? What are its advantages and disadvantages?

647


What are the types of data types and explain?

667


Write a program to know whether the input number is an armstrong number.

673


How do we declare variables in c?

566






please give me some tips for the placement in the TCS.

1631


Differentiate between new and malloc(), delete and free() ?

672


How can you read a directory in a C program?

650


Write a program to check armstrong number in c?

635


What do the functions atoi(), itoa() and gcvt() do?

724


How do I convert a string to all upper or lower case?

627


What is a union?

611


If I have a char * variable pointing to the name of a function ..

652


find out largest elemant of diagonalmatrix

1649


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

695