CP I/O Q14

0. The following program fragment
int a = 4, b = 6;
printf ("%d", a = b) ;

  • Option : D
  • Explanation :
    Here in this program, the output will be '6' .
    The program assigns b's value to a. So, a becomes 6. While, the "%d" will display value of the second variable in the printf statement which is "b=6"
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *