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. CSECSE — Explanation: #include<stdio.h> main ( ) { int fun ( );//1 fun ( );//2 (*fun) ( );//3 } int fun ( ) { printf ("CSE");} Function declaration --1 Function call…
- A.
CSE
- B.
CSECSE
- C.
CSECSECSE
- 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
Loading lesson…