Aspire Faculty ID #13649 · Topic: JAMIA MILLIA ISLAMIA MCA 2023 · Just now
JAMIA MILLIA ISLAMIA MCA 2023

What will be output of following statements? char ch; ch = 130; printf("\nvalue of ch=%d", ch);

Solution

Solution: In C, the range of `char` is from $-128$ to $127$. When we assign $130$ to a `char`, it overflows: $130 - 256 = -126$ Thus the value stored in `ch` is $-126$. Output: value of ch = -126

Previous 10 Questions — JAMIA MILLIA ISLAMIA MCA 2023

Nearest first

Next 10 Questions — JAMIA MILLIA ISLAMIA MCA 2023

Ascending by ID
Ask Your Question or Put Your Review.

loading...