Question 1
Which command in the cs50 environment is used to compile a C program?
Question 2
How do you properly declare an integer variable `x` initialized to 5 in C?
Question 3
What will be the output of this code? ```c int add(int a, int b) { return a + b; } int main(void) { printf("%d\n", add(2, 3)); } ```
Question 4
What is the output of the following code? ```c int x = 5, y = 10; if (x < y) { printf("x is less than y\n"); } else { printf("x is not less than y\n"); } ```
Question 5
What is the role of a compiler in the C programming environment?
Question 6
What does the `#include <stdio.h>` directive do in a C program?
Question 7
What will the following `for` loop print? ```c for (int i = 0; i < 3; i++) { printf("meow\n"); } ```
Question 8
Which of the following commands is used to list the files in a directory in the cs50 environment?
Question 9
How do you define a function that does not return any value in C?
Question 10
Which command in the cs50 environment is used to open a file in the code editor?
Question 11
In C, how would you get an integer input from the user using the CS50 library?
Question 12
Which escape sequence is used to insert a new line in C?
Question 13
In C, what data type would you use to store a user's name using the CS50 library?
Question 14
Which of the following statements correctly illustrates the use of a `while` loop?
Question 15
What is the purpose of `manual.cs50.io` in the cs50 environment?
Question 16
What is integer overflow?