What is printed by the following ANSI C program? #include<stdio.h> int…
PYQ GATE 2022
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\n", c, d, e);
return 0;
}
ASCII encoding for relevant characters is given below
ABC...Z65666790abc...z979899122*+-424345- A.
z K S
- B.
122 75 83
- C.
* - +
- D.
P x +
Attempted by 675 students.
Sign up free to check your answer
Sign up freeLoading lesson…

