What is the output of following program? #include <stdio.h> main( ) { int…

What is the output of following program?

#include <stdio.h>

main( )

{ int fun();

fun();

(*fun) (); }

int fun( )

{ printf("CSE");}

Answer: B. CSECSEExplanation: #include<stdio.h> main ( ) { int fun ( );//1 fun ( );//2 (*fun) ( );//3 } int fun ( ) { printf ("CSE");} Function declaration --1 Function call…

  1. A.

     CSE

  2. B.

    CSECSE

  3. C.

    CSECSECSE

  4. D.

    None

Attempted by 182 students.

Show answer & explanation

Correct answer: B

Explanation:

#include<stdio.h>

main ( )

{

int fun ( );//1

fun ( );//2

(*fun) ( );//3

}

int fun ( )

{ printf ("CSE");}

Function declaration --1

Function call by using function pointer --3

Function pointer will store address of function

So we can call function by using function pointer

Explore the full course: Isro

Loading lesson…