67 views
1 votes
1 votes
    #include <stdio.h>
    void f(int (*x)(int));
    int mysh(int);
    int (*sh)() = mysh;
    int main()
    {
        f(sh);
        sh++;
        for(int x=sh;x>=0;x--){
              if(x){
            printf("i am here");
        }else{
            printf("you go there");
        } 
        }
     
    }
    void f(int(*i)(int ))
    {
        i(10);
    }
    int mysh(int i)
    {
        printf("%d\n", i);
        return i;
    }

A:10

C:10 i will go there

B:10 i will go there number of times

D:10 i will go here number of times

Please log in or register to answer this question.

Related questions

449
views
3 answers
3 votes
GO Classes asked Jan 13
449 views
What will be the output of the following program?#include<stdio.h> void swap(char **s1, char **s2){ char *tmp; tmp=*s1; *s1=*s2; *s2=tmp; } int ... [0], strs[1], strs[2]); }pear apple orangeapple pear orangeorange apple pearapple orange pea
516
views
1 answers
3 votes
GO Classes asked Apr 30, 2022
516 views
What will be the output of the following C program?#include<stdio.h> int main() { static int p[] = {1, 2, 3, 0, 5, 6}; static int *q[] = {p+2, p+1, p, p+3, p+4, p+5}; ... q+3}; int ***pt; pt = r + 2; printf("%d", ***(pt+3)-**(q+1)); }