1. What is the error message/output in the following program?
void main( )
{
clrscr( )
printf(“Welcome”);
}
a) I don’t know
b) Semicolon missing
c) Welcome
d) Statement missing
a) I don’t know
b) Semicolon missing
c) Welcome
d) Statement missing
2. Check the below program
main( )
{
printf(“%d”,a/0));
}
a) Division by Zero (Warning)
b) Undefined Symbol ‘a’ (Error)
c) 0 (Output)
d) None of the above
3. Input function in ‘C’
a) printf() & scanf( )
b) scanf( ) & stdio.h
c) scanf( )
d) All the Above
4. Display the output
main( )
{
printf(“Welcoem to ‘C’ language”);
}
a) Welcome to ‘C’ language
b) Welcome to “C” language
c) Welcoem to ‘C’ language
d) Welcoem to ‘C’ language.
5. “stdio.h” and “conio.h” are often called as
a) Pre-defined functions
b) Library functions
c) Library files
d) Only C compiler knows
6. Which of the following is used to clear the output screen?
a) clearscr()
b) clearscreen()
c) clrscr()
d) clrscreen()
7. Division by 0 gives
a) Compiler error
b) Runtime error
c) Assembler error
d)None of the Above
8. Which of the following denote special operators in C?
a) ?:
b) ,
c) >
d) None of the Above
9. Which of the following denote invalid character constants in C?
a) 's'
b). '$'
c). 'E'
d). 'wer'
10. The long integer is denoted as
a) l
b) ld
c) Any of A or B
d) None of the Above
11. Relational operator in C compares two
a) Operands
b) operators
c). Both A and B
d). None of the Above
12. Which of the following functions can be used to enter an integer in C program?
a) getche
b). gets
c). scanf
d). None of the Above
13. What is the Boolean value of a false statement resulting in a C program?
a) 1
b) 0
c) -1
d) None of the Above
14. What is the output of the following program?
main()
{
int a=10,b=25;
a=b++ + a++;
b= ++b + ++a;
printf(“%d%dn”,a,b);
}
a) 35 65
b) 36 64
c) 37 64
d) 34 64
15. What is the output of the following program?
main()
{
char t1[]=“Exforsys”;
char t2[]= “Training”;
printf(“%s”,t1);
}
a) E
b) Exforsys
c). NULL
d). Exforsys Training
16. The modifier used for horizontal tab is
a) h
b) ht
c) t
d) th
17. What is the output of the statement?
printf("Exforsys Training \nis \n Very Good");
a) Exforsys
Training
is Very Good
b) Exforsys Training
is Very Good
c) Exforsys Training is Very Good
d) Exforsys Training
is
Very Good
18. The code used for denoting unsigned decimal integer in scanf is
a) %d
b) %u
c) %ud
d) None of the Above
19. Which takes the first precedence in evaluation among the following operators?
a) ||
b) !
c) &&
d) All the Above has equal precedence
20. The unsigned char have maximum value of
a) 128
b) 300
c) 255
d) 240
15. main()
ReplyDelete{
char t1[]=“Exforsys”;
char t2[]= “Training”;
printf(“%s”,t1);
}
Ans: Exforsys.
17. printf("Exforsys Training \nis \n Very Good");
Ans: Exforsys Training
is
Very Good
Please correct these two answers
14.
ReplyDeletemain()
{
int a=10,b=25;
a=b++ + a++;
b= ++b + ++a;
printf(“%d%dn”,a,b);
}
Ans: 37 64
Correct This answer also
Hi Sriram,
ReplyDeleteCan you check your key once from 12th question on-words. There are some mistakes in your key.
ur 14) ans is wrong ..... right is 35 63
ReplyDeletekkkk my calculation is wrong ur answer is accurate...
ReplyDeleteFor Best C Programs with Full Explanatons..
ReplyDeleteVisit Here ►► Lightning Code