GATE (Graduate Aptitude Test in Engineering) Computer Science & IT (CS): Questions 2099 - 2101 of 3196
Choose Programs:
🎓 Study Material (1190 Notes): 2024-2025 Syllabus
Rs. 1000.00 -OR-
3 Year Validity (Multiple Devices)
Topic-wise Notes & SampleDetails
🎯 302 Numeric, 2894 MCQs (& PYQs) with Full Explanations (2024-2025 Exam)
Rs. 650.00 -OR-
3 Year Validity (Multiple Devices)
CoverageDetailsSample Explanation
Help me Choose & Register (Watch Video) Already Subscribed?
Question 2099
Appeared in Year: 2019
Question MCQ▾
Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let , and be the placeholders for the non-terminals D, T, L or in the following table:
Production rule | Semantic action |
T. type = int | |
T. type = int | t. type = float |
add Type |
Which one of the following are the appropriate choices for and ?
Choices
Choice (4) | Response | |
---|---|---|
a. | ||
b. | ||
c. | ||
d. |
Question 2100
Question MCQ▾
What will be the result of following operations
1 ⊕ 0 ⊕ 1 ⊕ 1 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 1 ⊕ 1
Choices
Choice (4) | Response | |
---|---|---|
a. | 0 | |
b. | 1 | |
c. | Question does not provide sufficient data or is vague | |
d. | None of the above |
Question 2101
Appeared in Year: 2019
Question MCQ▾
Consider the following C function.
void convert ( int n ) {
if ( n < 0 ) {
printf ( "%d" , n ) ;
} else {
convert ( n/2 ) ;
printf ( "%d" , n%2 ) ;
}
}
Which one of the following will happen when the function convert is called with any positive integer n as argument?
Choices
Choice (4) | Response | |
---|---|---|
a. | It will not print anything and will not terminate | |
b. | It will print the binary representation of n but will not terminate | |
c. | It will print the binary representation of n in the reverse order and terminate | |
d. | It will print the binary representation of n and terminate |