Log In Register

Units


Formatted Output - Questions and Answers

 

Practice these Formatted 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 Formatted Output for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Formatted Output of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically Formatted 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 Formatted 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  Formatted Output topic of C Programming:

 

1.

The syntax to print a % using printf statement can be done by.

Answer: Option B

Explanation:

2.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         char *s = "myworld";
  5.         int i = 9;
  6.         printf("%*s", i, s);
  7.     }

Answer: Option C

Explanation:

3.

What is the difference between %e and %g?

Answer: Option C

Explanation:

4.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = 10, j = 3;
  5.         printf("%d %d %d", i, j);
  6.     }

Answer: Option B

Explanation:

5.

What does this statement printf(“%10s”, state); means?

Answer: Option C

Explanation:

6.

. What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = 10, j = 2;
  5.         printf("%d\n", printf("%d %d ", i, j));
  6.     }

Answer: Option A

Explanation:

7.

Escape sequences are prefixed with.

Answer: Option A

Explanation:

8.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = 10, j = 3, k = 3;
  5.         printf("%d %d ", i, j, k);
  6.     }

Answer: Option B

Explanation:

9.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main(int argc, char** argv)
  3.     {
  4.         char *s = "myworld";
  5.         int i = 3;
  6.         printf("%10.*s", i, s);
  7.     }

Answer: Option A

Explanation:

10.

What are the Properties of first argument of a printf functions?

Answer: Option A

Explanation:

11.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = 10, j = 2;
  5.         printf("%d\n", printf("%d %d ", i, j));
  6.     }

Answer: Option B

Explanation:

12.

What is the purpose of sprintf?

Answer: Option A

Explanation: