Choose the correct answer for each problem: What values should be written in the last column of the truth table? X Y XA-Y 1 1 1 a) 0, 1, 0 b) 1, 1, 1 c) 0, 1, 1 d) 0, 0, 1

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
C 8
www.hackerrank.com/contests/ug-midterm/challenges/multiple-choice-3-1
Problem
Submissions
Leaderboard
Discussions
f D in
Choose the correct answer for each problem:
• What values should be written in the last column of the truth table?
Contest ends in an hour
Submissions: 2
X
Y
XA-Y
Max Score: 5
Difficulty: Medium
1
Rate This Challenge:
More
a) 0, 1, 0 b) 1, 1, 1
с) 0, 1, 1
d) 0, 0, 1
• For which values of K will the loop print only those numbers that have the index of multiple of 3?
for (int i=0; i<sizeof(array)/sizeof(int); K) {
cout << array [i];
a) i++
b) i*3
c) i/3
d) i+3
• Number 10 was converted into binary form and each bit was saved in the array as an integer. Then the
second array was created and each number was saved there as a character. How much memory was allocated
for both of these arrays on 32bit system?
a) 36 bytes
b) 24 bytes c) 20 bytes d) 16 bytes
Transcribed Image Text:C 8 www.hackerrank.com/contests/ug-midterm/challenges/multiple-choice-3-1 Problem Submissions Leaderboard Discussions f D in Choose the correct answer for each problem: • What values should be written in the last column of the truth table? Contest ends in an hour Submissions: 2 X Y XA-Y Max Score: 5 Difficulty: Medium 1 Rate This Challenge: More a) 0, 1, 0 b) 1, 1, 1 с) 0, 1, 1 d) 0, 0, 1 • For which values of K will the loop print only those numbers that have the index of multiple of 3? for (int i=0; i<sizeof(array)/sizeof(int); K) { cout << array [i]; a) i++ b) i*3 c) i/3 d) i+3 • Number 10 was converted into binary form and each bit was saved in the array as an integer. Then the second array was created and each number was saved there as a character. How much memory was allocated for both of these arrays on 32bit system? a) 36 bytes b) 24 bytes c) 20 bytes d) 16 bytes
• What will be the value of a at the end of the program?
double innerFunction2 (int a){
return a\*a/23;
int innerFunction1(int a){
return innerFunction2 (a) \*innerFunction2 (a);
int outerFunction (int a){
return innerFunction1(a) + innerFunction2 (a-2);
int main() {
double a = outerFunction (3);
return 0;
a)
22
b) 24,5
c) 22,75 d) 20,75
• What will this program print?
enum vehicles {skateboard, scooter, bicycle, car, bus, train, boat, airplane, rocket,
planet};
void myVehicle(){
int currentVehicle = 5;
switch (currentVehicle) {
case bicycle:
case scooter:
cout << "I have two tires!";
break;
case skateboard:
case car:
case bus:
case airplane:
cout << "I have four tires!";
break;
case train:
Transcribed Image Text:• What will be the value of a at the end of the program? double innerFunction2 (int a){ return a\*a/23; int innerFunction1(int a){ return innerFunction2 (a) \*innerFunction2 (a); int outerFunction (int a){ return innerFunction1(a) + innerFunction2 (a-2); int main() { double a = outerFunction (3); return 0; a) 22 b) 24,5 c) 22,75 d) 20,75 • What will this program print? enum vehicles {skateboard, scooter, bicycle, car, bus, train, boat, airplane, rocket, planet}; void myVehicle(){ int currentVehicle = 5; switch (currentVehicle) { case bicycle: case scooter: cout << "I have two tires!"; break; case skateboard: case car: case bus: case airplane: cout << "I have four tires!"; break; case train:
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education