adplus-dvertising
frame-decoration

Question

What is the output of this C code (when 4 and 5 are entered)?
#include <stdio.h>
    void main()
    {
        int m, n;
        printf("enter a number");
        scanf("%d", &n);
        scanf("%d", &m);
        printf("%d\t%d\n", n, m);
    }

a.

Error

b.

4 junkvalue

c.

Junkvalue 5

d.

4 5

Posted under C Programming

Answer: (d).4 5

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this C code (when 4 and 5 are entered)?