What will be the output of the program?
#include<stdio.h>
int

Home | Discussion Forum

What will be the output of the program?

#include<stdio.h>
int check (int, int);
int main()
{
int c;
c = check(10, 20);
printf("c=%d\n", c);
return 0;
}
int check(int i, int j)
{
int *p, *q;
p=&i;
q=&j;
i>=45 ? return(*p): return(*q);
}

View More Related Question

2) What will be the output of the program in 16 bit platform (Turbo C under DOS)?

#include<stdio.h>
int main()
{
int fun();
int i;
i = fun();
printf("%d\n", i);
return 0;
}
int fun()
{
_AX = 1990;
}

3) Which of the following statements are correct about the function?

long fun(int num)
{
int i;
long f=1;
for(i=1; i<=num; i++)
f = f * i;
return f;
}

4) If int is 2 bytes wide.What will be the output of the program?

#include <stdio.h>
void fun(char**);
int main()
{
char *argv[] = {"ab", "cd", "ef", "gh"};
fun(argv);
return 0;
}
void fun(char **p)
{
char *t;
t = (p+= sizeof(int))[-1];
printf("%s\n", t);
}

5) What will be the output of the program?

#include<stdio.h>
int fun(int(*)());
int main()
{
fun(main);
printf("Hi\n");
return 0;
}
int fun(int (*p)())
{
printf("Hello ");
return 0;
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.