Log In Register

Units


Standard Input & Output - Questions and Answers

 

Practice these Standard Input & Output under C Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Standard Input & Output for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Standard Input & Output of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically Standard Input & Output.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Standard Input & Output under C Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Standard Input & Output topic of C Programming:

 

1.

What does the following command line signify?
    prog1|prog2

Answer: Option B

Explanation:

2.

What is the return value of putchar()?

Answer: Option A

Explanation:

3.

What is the output of this C code if
    following commands are used to run(considering myfile exists)?
    gcc -otest test.c
    ./test > myfile

  1.  #include <stdio.h>
  2.     int main(int argc, char **argv)
  3.     {
  4.         char c = 'd';
  5.         putchar(c);
  6.         printf(" %d\n", argc);
  7.     }

Answer: Option D

Explanation:

4.

The statement prog <infile causes

Answer: Option D

Explanation:

5.

What is the output of this C code if
    following commands are used to run(considering myfile exists)?
    gcc -otest test.c
    ./test < myfile

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         char c = 'd';
  5.         putchar(c);
  6.     }

Answer: Option B

Explanation:

6.

Which among the following is odd one out?

Answer: Option A

Explanation:

7.

For a typical program, the input is taken using

Answer: Option D

Explanation:

8.

What is the use of getchar()?

Answer: Option A

Explanation:

9.

What is the default return-type of getchar()?

Answer: Option C

Explanation:

10.

Which is true about function tolower?

Answer: Option D

Explanation:

11.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         char c = '�';
  5.         putchar(c);
  6.     }

Answer: Option C

Explanation:

12.

What is the output of this C code if
    following commands are used to run and if myfile does not exist?
    gcc -o test test.c
    ./test > myfile

  1.  #include <stdio.h>
  2.     int main(int argc, char **argv)
  3.     {
  4.         char c = 'd';
  5.         putchar(c);
  6.         printf(" %d\n", argc);
  7.     }

Answer: Option C

Explanation:

13.

The value of EOF is_____

Answer: Option D

Explanation:

14.

Which is true?

Answer: Option B

Explanation:

15.

putchar(c) function/macro always outputs character c to the

Answer: Option C

Explanation: