Aspire Faculty ID #12761 · Topic: JECA MCA 2023 · Just now
JECA MCA 2023

What is the output?

#include <stdio.h>
void main(){
  char M = 'M';
  printf("%d, %c", M, M);
}

Solution

Explanation: The character 'M' has an ASCII value of 77. So printing with %d shows 77, and %c shows M. $$ \text{Output: } 77,\ M $$

Previous 10 Questions — JECA MCA 2023

Nearest first

Next 10 Questions — JECA MCA 2023

Ascending by ID
Ask Your Question or Put Your Review.

loading...