GATE CS 2022 · Question 44 · Programming and Data Structures · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

What is printed by the following ANSI C program?
#include<stdio.h> int main(int argc, char *argv[]) char a = 'P'; char b = 'x'; char c = (a b) + '*'; char d = (a | b) - '-'; char e = (a b) + '+'; printf("%c %c %c ", c, d, e); return 0;
ASCII encoding for relevant characters is given below

ABC...Z
656667...90
abc...z
979899...122
*+-
424345
  1. (A) z K S
  2. (B) 122 75 83
  3. (C) * - +
  4. (D) P x +
Answer

Answer (A)

Answer from the official GATE CS 2022 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes