Functions


  1. Which of the following function declaration is illegal?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    int 3BHK(int*, int []); or int 2BHK(int); and int IBHK(int s); function declaration are illegal


  1. Which function definition will run correctly?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

     int add(int n, int m)
    {return (n + m);}



  1. Can we use a function as a parameter of another function? [ Eg: void funA(int funB()) ].











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    No, C does not support it


  1. The value obtained in the function is given back to main by using ________ keyword.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    return



  1. What will be the output of the following C code?
    #include <stdio.h>
    int fun(char ch, ...);
    int main()
    {
    char chr = 99;
    fun(chr);
    return 0;
    }
    int fun(char chr, ...)
    {
    printf("%c\n", chr);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    c