Initialization, String Handling, strlen, strcat,
strcmp, Character Arrays, Integer Arrays, Loops,
printf Output, Function Calls, Scope, Local vs
Global Variables, Passing Arrays to Functions,
Return Values, Function Prototypes, Header Files,
#include Directives, Makefile Compilation,
Executable Naming, make Commands, Source File
Management, String Concatenation, String
Comparison, Null Terminator, Input/Output, Control
Flow, Variable Tracing, Debugging, C Syntax,
Pointers and Addresses, Array Indexing, Common
Errors, Code Documentation, Modular
Programming, Function Implementation vs
Prototype Exam Questions Verified and Provided
with A+ Graded Rationales Latest Updated 2026
Declare an array of 5 integers called array1 and initialize the array with the values 1-5.
int array1[5] = {1, 2, 3, 4, 5};
Is this a valid array declaration?
int array2[] = {1, 2, 3, 4, 5};
yes
What would print to the screen with this code?
int array3[5] = {1, 2, 3};
int i;
for(i = 0; i < 5; i++)
printf("%d ", array3[i]);
12300
, What would print to the screen with this code?
int array3[5] = {'1', '2', '3'};
int i;
for(i = 0; i < 5; i++)
printf("%d ", array3[i]);
49 50 51 0 0
How many characters are in this array?
char word1[] = {"CS for all"};
11 total
Finish this code to find the length of the string:
char word1[] = {"CS for all"};
int length;
// use strlen function
length = strlen(word1);
What value will the printf print?
char word1[] = {"CS for all"};
int length = strlen(word1);
printf("length of word1 is: %d\n" length);
10
How many characters are in this array?
char word2[] =
{'a', 'l', 'l', ' ', 'i', 'n'};
6 total
Write the code to combine the contents of the first three word arrays to produce the phrase "All
in for Clemson" in the phrase array.
char word3[] = {"All in "};
char word4[] = {'f', 'o', 'r', '\0'};