-------------------------------------------------------------------------------------------------------------
Next Page Last Page
-------------------------------------------------------------------------------------------------------------
1.
What is the output of this C code?
#include
int main()
{
char c = '�';
putchar(c);
}
A. Compile time error
B. Nothing
C. 0
D. Undefined behaviour
Answer: B
------------------------------------------------------------------------------------------------------
2.
The statement prog
A. prog to read characters from infile.
B. prog to write characters to infile.
C. infile to read characters from prog instead.
D. nothing
Answer: A
-------------------------------------------------------------------------------------------------------
3.
What is the output?
#include
int main(int argc, char **argv)
{
char c = 'd';
putchar(c);
printf(" %d\n", argc);
}
A. d 2 in myfile
B. d 1 in myfile
C. Depends on the system
D. Depends on the standard
Answer: B
---------------------------------------------------------------------------------------------------
4.
Which is true about function tolower?
A. The function tolower is defined in
B. Converts an upper case letter to lower case
C. returns other characters untouched
D. None of the mentioned
Answer: D
--------------------------------------------------------------------------------------------------
5.
Which among the following is odd one out?
A. printf
B. fprintf
C. putchar
D. scanf
Answer: D
--------------------------------------------------------------------------------------------------
Next Page Last Page
--------------------------------------------------------------------------------------------------
More Imp Topics:
Data Types
Operators
Pointers
Array
Preprocessor
Structures
Control Structures
Switch Case
Next Page Last Page
-------------------------------------------------------------------------------------------------------------
1.
What is the output of this C code?
#include
int main()
{
char c = '�';
putchar(c);
}
A. Compile time error
B. Nothing
C. 0
D. Undefined behaviour
Answer: B
------------------------------------------------------------------------------------------------------
2.
The statement prog
A. prog to read characters from infile.
B. prog to write characters to infile.
C. infile to read characters from prog instead.
D. nothing
Answer: A
-------------------------------------------------------------------------------------------------------
3.
What is the output?
#include
int main(int argc, char **argv)
{
char c = 'd';
putchar(c);
printf(" %d\n", argc);
}
A. d 2 in myfile
B. d 1 in myfile
C. Depends on the system
D. Depends on the standard
Answer: B
---------------------------------------------------------------------------------------------------
4.
Which is true about function tolower?
A. The function tolower is defined in
B. Converts an upper case letter to lower case
C. returns other characters untouched
D. None of the mentioned
Answer: D
--------------------------------------------------------------------------------------------------
5.
Which among the following is odd one out?
A. printf
B. fprintf
C. putchar
D. scanf
Answer: D
--------------------------------------------------------------------------------------------------
Next Page Last Page
--------------------------------------------------------------------------------------------------
More Imp Topics:
Data Types
Operators
Pointers
Array
Preprocessor
Structures
Control Structures
Switch Case