Q. | What will be the output of the program? #include
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);
}
|
|||||||
|
Answer: | Option D | |
Explaination: | There is an error in this line i>=45 ? return(*p): return(*q);. We cannot use return keyword in the terenary operators. |
Discussion
Your Comments Goes here... |
Name | Discussion |
---|