adplus-dvertising
frame-decoration

Question

What number would be shown on the screen after the following statements of C are executed?
char ch; 
int i; 
ch = 'G'; 
i = ch-'A';
printf("%d", i);

a.

5

b.

6

c.

7

d.

8

Posted under C Programming

Answer: (b).6

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What number would be shown on the screen after the following statements of C are executed?

Similar Questions

Discover Related MCQs

Q. Which of following is not a valid name for a C variable?

Q. If ASCII value of 'x' is 120, then what is the value of the H, if
H = ('x' – 'w' ) / 3;

Q. What is the difference between a declaration and a definition of a variable?

Q. "My salary was increased by 15%" Select the statement, which will EXACTLY reproduce the line of text above.

Q. Nesting of if-else statements is allowed in C Programming.

Q. A char variable storing either an ASCII character or a Unicode character is allowed inside switch case.

Q. We cannot use String in the Switch case as label !

Q. Which of the following cannot be checked in a switch case statement ?

Q. Continue statement is allowed inside the switch case statement ?

Q. Which of the statement we need to write , in order to check any condition.

Q. Which of the following is not an example of looping statement ?

Q. For loop is _________.

Q.
What are the types of linkages?

Q. Which of the following special symbol allowed in a variable name?

Q. "C"was primarily developed as a

Q. "C" is a

Q. Most suitable option for  “C” literal is:

Q. Length of the string “Correct” is

Q. Choose the correct statement:

Q. The “const” feature can be applied to