ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2254)
 C++ interview questions  C++ Interview Questions (1111)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (646)
Question
what will be the output of "printf("%d%d",scanf("%d%
d",&a,&b))".provide an explation regarding the question
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
i think it will print the 2, and some garbage value. 
Is This Answer Correct ?    7 Yes 0 No
Dipendra
 
Answer
# 2
scanf() returs the number of vlaues read successfully. so
heree the pritf() prints the value that is returned by the
scanf(), ie 2.(a,b). so the output will be 2 and some
garbage value.
 
Is This Answer Correct ?    4 Yes 0 No
Amegha
 
 
 
Answer
# 3
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 ?    1 Yes 0 No
Manish Soni Bca 3rd Year Jaipu
 
Answer
# 4
if we enter
1234
5678
answer is
2 5678
plz tell how
 
Is This Answer Correct ?    1 Yes 1 No
Manish Soni Bca 3rd Year Jaipu
 
Answer
# 5
you are right mr. manish that it will print 2 and value of
'b' but i also dont know why it is printing the value of 'b'..
 
Is This Answer Correct ?    0 Yes 0 No
Akki166786
 
Answer
# 6
the output will be what value of a and b... 
Is This Answer Correct ?    1 Yes 8 No
Nilambuja
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Why doesn't C have nested functions?   2
Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV Accenture 5
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} what would be the output? Wipro 1
when user give a number it multiply with 9 without useing '+' and '*' oprator   4
why do we use # in c-language?   1
Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.   1
How to run c Program without using IDE of c. means if program made in notepad.then how to compile by command prompt. TCS 1
What character terminates all strings composed of character arrays? 1) 0 2) . 3) END   3
write a program to find the number of even integers and odd integers in a given array in c language Olive-Tech 13
How can we open a file in Binary mode and Text mode?what is the difference? PanTerra 1
what is c language?   2
what will be the output for the following main() { printf("hi" "hello"); }   5
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com