GATE Papers >> CSE >> 2016 >> Question No 22

Question No. 22 CSE | GATE 2016

Consider the following C program.

void f(int, short);
void main()
{
    int i = 100;
    short s = 12;
   short *p = &s;
   __________ ; // call to f()
}

Which one of the following expressions, when placed in the blank above, will NOT result in a type checking error?


Answer : (D) f(i,*p)


Solution of Question No 22 of GATE 2016 CSE Paper

f(s, *s) since there is no pointer variable define with *s. So this function will give type checking error.

i = f (i, s) since function prototype is void in void f (int, short) i.e., f is accepting argument int type and short type and its return type should be integer because we store the output of function invariable i which is integer type. So there must be type casting into integer type but type casting is not present. So this function will give type checking error.

f(i, *s) since there is no pointer variable define with *s. So this function will give type checking error.

f(i, *p) in this function to argument are pass one is int type and another is short type defined in the main function. So this function will not give type checking error.

Comments
P8wQr4 http://pills2sale.com/ levitra nizagara

Posted on  18/10/2020 18:34:56  by  dobsonz
DUP8hV https://www.quora.com/What-the-top-SEO-keywords-for-essay-you-know/answer/Alan-Smith-1772 write my essay

Posted on  04/12/2020 01:07:53  by  dobson
g1gdxM http://xnxx.in.net/ xnxx videos

Posted on  12/12/2020 21:51:27  by  johnan
yDRHA7 https://writemyessayforme.web.fc2.com/

Posted on  13/12/2020 03:53:05  by  dobson
j22CFV https://writemyessayforme.web.fc2.com/#writemyessay

Posted on  15/12/2020 04:53:55  by  dobson
hcYyrm https://writemyessayforme.web.fc2.com/octavio-paz-essay-day-of-the-dead.html

Posted on  09/01/2021 10:49:02  by  dobson
lWFQUb http://waldorfdollshop.us/ waldorf doll

Posted on  09/01/2021 15:05:50  by  johnanz
KFSMsH https://beeg.x.fc2.com/

Posted on  26/01/2021 15:55:48  by  markus
sSQqRo https://buyzudena.web.fc2.com/

Posted on  27/01/2021 12:49:10  by  markus
Leave a comment