Computer Science and Information Technology
2018 · Paper 1
Take it one question at a time. Try an answer, then check your understanding.
Complete GATE CSE 2018 Paper 1 overview, original pages and practice · Timed previous-paper practice
Questions 37–39 of 65. Imported answers require review unless explicitly marked reviewed.
Question 27
Open questionCSMCQ2 marksNeeds review
Let N be the set of natural numbers. Consider the following sets.
P: Set of Rational numbers (positive and negative)
Q: Set of functions from to N
R: Set of functions from N to S: Set of finite subsets of N.
Which of the sets above are countable?
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 28
Open questionCSMCQ2 marksNeeds review
Consider the first-order logic sentence
where
is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose
has a model with a universe containing 7 elements.
Which one of the following statements is necessarily true?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 29
Open questionCSMCQ2 marksNeeds review
Consider the following C program:
#include<stdio.h>
void fun1(char *s1, char *s2){
char *tmp;
tmp = s1;
s1 = s2;
s2 = tmp;
}
void fun2(char **s1, char **s2){
char *tmp;
tmp = *s1;
*s1 = *s2;
*s2 = tmp;
}
int main(){
char *str1 = "Hi", *str2 = "Bye";
fun1(str1, str2); printf("%s %s", str1, str2);
fun2(&str1, &str2); printf("%s %s", str1, str2);
return 0;
}
The output of the program above is
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