• edited by
1,064 views
0 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?

2 Answers

Position:
Show:

Related questions

3 3 votes
2 answers 2 answers
1.0k
1.0k views
Shamim Ahmed asked Dec 11, 2018
1,014 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
1 1 vote
2 2 answers
5.8k
5.8k views
talha hashim asked Oct 3, 2018
5,815 views
Consider the following c-program:#include<stdio.h>int main() {char *arr[ ] ={"GATE", "CAT", "IES", "IAS", "PSU", "IFS" };call(arr);return 0;}void call (char ptr) {char ...
0 0 votes
1 1 answer
1.8k
1.8k views
Rishabh Gupta 2 asked Jan 30, 2018
1,842 views
Consider the C node fragment given below:Which of the following true about above code if input is given as linked list of n-element in which for each node memory is creat...
0 0 votes
0 0 answers
1.4k
1.4k views