12th Computer CHP 10
12th Computer CHP 10
272
Accesa
Short Questions
274
IT Series Computer
character input.
Science(MS Atm WriteCCs
names of functions used for after
thes
The three
Q.26. List functions used for character input are scanf(), getch() and getche). print("%
"getch" function?
Q.27. What is the use of
WriteCs
is usedtoinput single character from user. It is an
The getch( )functionexecuted, printf("
character". When it is the character entered by user is not abbre
"get
Q.28. What is the difference between scanf
and getch function? displayed
The scanf() function is used to get different types of inputs from the user
n WriteC s
Scanf("
value. The getch() as
needs to press Enter after typing the input is used to itu Q Write
function
character. The user does not need to press Enter after typing the input valie
Thefile i
"getche" function? C\My
Q.29. What is the use of Ans: prir
The getche function is used to input single character from user. It is an sk sin
character". When it is used, the character entered by the user is displayed on the Qs. Write
"get C
Compare getch and getche functions?
Q.30.
getch and getche are used to input single character. When getch is used. the m
getche is used, character appears
entered by user does not appear on screen. When
getche) functions?
Q.31. Which header file is required to use getch)and
Ans: pr
header file conio.h.ThsQ9. Write tt
The functions getch() and getche() are defined in the
use these functions. char a
file must be included in the program to scanf("
between gets and puts functions.
Q.32. Differentiate from the user. The input sSM10. Write t
to input string values
The gets function is used display string values on the screen. taa a, b anc
is used to
string variable. The puts function int a, b
string constant or string variable. screen in C?
Scanf(
Q.33. Which function is
used to clear the abbreviationof cer printf(
used to clear the screen. It is
an
cursor blinksonte QI1. Write
The clrscr function is cleared and the
When this function is executed, the screen is Hello'
corner. Thisfunction is
available in the header file conio.h. Sequencecharacters
and escape butescpe
Dear\
Ans: p
3
Q.34. Differentiate
between format specifiers functionsspecity
te
Q12. Write
both with input and outputare usedtotheoulpu
Format specifiers are
used
functions. Format specifierscharactersto Hellow
The
character is only used in output to insert special
data and escape Sequence characteris used
WritingtheCode
CPrAns:og
Part2: following message:
Qi3, Rewn
printf statement
the
to print float a
single