Computer Science and Information Technology
2022 · Paper 1
Take it one question at a time. Try an answer, then check your understanding.
Complete GATE CSE 2022 Paper 1 overview, original pages and practice · Timed previous-paper practice
Questions 43–45 of 65. Imported answers require review unless explicitly marked reviewed.
Question 43
Open questionCSMCQ2 marksNeeds review
What is printed by the following ANSI C program?
#include<stdio.h>
int main(int argc, char *argv[])
{
int a[3][3][3] =
{1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27};
int i = 0, j = 0, k = 0;
for( i = 0; i < 3; i++ ) {
for(k = 0; k < 3; k++ )
printf("%d ", a[i][j][k]);
printf("\n");
}
return 0;
}
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 44
Open questionCSMCQ2 marksNeeds review
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:
Character | A | B | C | ... | Z | a | b | c | ... | z | * | + | − |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ASCII code | 65 | 66 | 67 | ... | 90 | 97 | 98 | 99 | ... | 122 | 42 | 43 | 45 |
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 45
Open questionCSMCQ2 marksNeeds review
Consider solving the following system of simultaneous equations using LU decomposition.
where
and
are denoted as
Which one of the following is the correct combination of values for
,
, and
?Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer