Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void function(int m, int n)
    {
    printf("%d %d\n", m, n);
    }
    void main()
    {
    int s = 16, t = 15;
    function(s);
    }
    1. Garbage value
    2. Runtime Error
    3. 16 15
    4. 15 16
    5. Compilation Error
Correct Option: E

Compilation Error

main.c: In function ‘main’:
main.c:9:9: error: too few arguments to function ‘function’
function(s);
^~~~~~~~
main.c:2:10: note: declared here
void function(int m, int n)



Your comments will be displayed only after manual approval.