edited by
701 views
0 votes
0 votes
Consider the following program segment
int main ( )
{
char ∗ str = “GATECS”;
printf (“%d”, madeeasy (str));
return 0;
}
int madeeasy (int ∗ p1)
{
int ∗ p2 = p1;
while (∗++p1);
return (p1 – p2);
}
The output of the above program will be ______. Assume that the object of data type int occupies 2 bytes.

Is this question right because according to me types are not same when we pass argument inside madeeasy?
edited by

2 Answers

Related questions

3 votes
3 votes
2 answers
3
Shamim Ahmed asked Dec 11, 2018
549 views
char *a = “MADEEASY”;char *b = “GATECSIT2019”;char *r = a;char *s = b;printf(“%d”, (int) strlen (b+3[r] – 1[s]));return 0; Whats the output? Answer given 8