1
CSCI 1730 Exam 1 Questions with Correct
Answers | Updated (100% Correct Answers)
Size of a char— Answer: 1 byte (8 bits)
Size of a short— Answer: 2 bytes (16 bits)
size of an int— Answer: 4 bytes (32 bits)
size of a long— Answer: 8 bytes (64 bits)
size of a float— Answer: 4 bytes (32 bits)
size of a double— Answer: 8 bytes (64 bits)
size of a boolean— Answer: 1 byte (4 bits)
How do you compile code in C?— Answer: gcc -Wall [filename].c -g
-o [filename].out
Ternary Operator— Answer: condition ? result 1 : result 2
7 == 5 ? 4 : 3
(is 7 = 5?)
yes: output 4
no: output 3
© 2025 All rights reserved
CSCI 1730 Exam 1 Questions with Correct
Answers | Updated (100% Correct Answers)
Size of a char— Answer: 1 byte (8 bits)
Size of a short— Answer: 2 bytes (16 bits)
size of an int— Answer: 4 bytes (32 bits)
size of a long— Answer: 8 bytes (64 bits)
size of a float— Answer: 4 bytes (32 bits)
size of a double— Answer: 8 bytes (64 bits)
size of a boolean— Answer: 1 byte (4 bits)
How do you compile code in C?— Answer: gcc -Wall [filename].c -g
-o [filename].out
Ternary Operator— Answer: condition ? result 1 : result 2
7 == 5 ? 4 : 3
(is 7 = 5?)
yes: output 4
no: output 3
© 2025 All rights reserved