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 (2262)
 C++ interview questions  C++ Interview Questions (1118)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
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
 
what is the use of keyword volatile?? LG-Soft 4
can we declare a variable in different scopes with different data types? answer in detail TCS 3
C program to perform stack operation using singly linked list   3
Which of these statements are false w.r.t File Functions? i)fputs() ii)fdopen() iii)fgetpos() iv)ferror() A)ii B)i,ii C)iii D)iv Accenture 6
What's wrong with "char *p; *p = malloc(10);"?   5
how i m write c program 1.check prime number 2.prime number series   1
how to find the largest element of array without using relational operater? Wipro 6
2. Counting in Lojban, an artificial language developed over the last fourty years, is easier than in most languages The numbers from zero to nine are: 0 no 1 pa 2 re 3 ci 4 vo 5 mk 6 xa 7 ze 8 bi 9 so Larger numbers are created by gluing the digit togather. For Examle 123 is pareci Write a program that reads in a lojban string(representing a no less than or equal to 1,000,000) and output it in numbers. Nagarro 3
Program to write some contents into a file using file operations with proper error messages.   2
write a c program to convert fahrenheit to celsius? TCS 4
explain memory layout of a C program   2
HOW TO HANDLE EXCEPTIONS IN C   8
 
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