359 views

2 Answers

0 votes
0 votes
C is the most suitable option.
0 votes
0 votes

let's see this one by one...

A> is not the answer cause let's say y = 14.

then for first expression it is  (3*(14-8))/9 = 18/9 = 2 (integer division)

then for second expression it is  ((14-8)/9)*3 = (6/9)*3 = 0*3 (integer division 6/9 is zero.) = 0

B>  is not the answer cause let's say y = 15. 

then for first expression it is  (3*(15-8))/9 =  21/9 = 2 (integer division)

then for second expression it is  ((15-8)/9)*3 = (7/9)*2 = 0*3 (integer division 7/9 is zero.) = 0

C>  is the answer cause let's say (y-8) = 9K (K belongs to integer). 

then for first expression it is  (3*9K)/9 = 27K/9 =  3K(integer division)

then for second expression it is  ((9K)/9)*3 = K*3 = 3K 

 
 

D>  is not the answer cause let's say (y-8) = 3K (K belongs to integer). 

then for first expression it is  (3*3K)/9 = 9K/9 =  K(integer division)

then for second expression it is  ((3K)/9)*3 = (K/3)*3 not equal to K for say (k=5 in integer division)

Related questions

0 votes
0 votes
1 answer
1
Debargha Mitra Roy asked Apr 16
67 views
#include <stdio.h int main() { int a[3] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; }(Assume size of int to be $2$ bytes.)T...
0 votes
0 votes
2 answers
3
Debargha Mitra Roy asked Apr 10
113 views
What is the output of the below code?#include <stdio.h void main() { static int var = 5; printf("%d ", var ); if (var) main(); }a. 1 2 3 4 5b. 1c. 5 4 3 2 1d. Error
1 votes
1 votes
1 answer
4
SSR17 asked Feb 29
254 views
#include <stdio.h int main() { int i = -1; int x = (unsigned char)i; printf("%d", x); return 0; }output is 255 , but please explain how