edited by
585 views
0 votes
0 votes
#include<stdio.h>
int fun1(int x)
{
    x=14;
}
int fun2(int x)
{
    x=20;
}
int main()
{
    int(*p)(),m,n;
    scanf("%d",&m);
    if(m)
    p=fun1;
    else
    p=fun2;
    n=(*p)();
    printf("%d",n);
    return 0;
}

Suppose input given 0

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
srestha asked Mar 6, 2018
395 views
#include<stdio.h int main() { char a[]={'A','B','C','D'}; char *p=&a[0]; *p++; printf("%c%c",*++p, *p); }What will be the output?1)C B2)B B3)B A4)C A
0 votes
0 votes
1 answer
2
Parshu gate asked Nov 27, 2017
622 views
main( ){double x, d = 5.0;int y ;x = d * (x = 2.5/d);printf(“x=%lf\n”,x);x = d*(y=(int)2.5+1.5);printf("x=%lf y=%d\n",x,y);}What is output of above program?
0 votes
0 votes
1 answer
3
Parshu gate asked Nov 19, 2017
359 views
#include<stdio.h>int main(){ int a=2;if(a==2){ a=~a+2<<1; printf("%d",a);}}