Complete the code to declare a string variable in C.
char name[20] = [1];
Strings in C are enclosed in double quotes. Single quotes are for single characters.
Complete the code to print the string stored in variable 'text'.
printf([1], text);Use %s to print strings in C with printf.
Fix the error in the code to copy string 'source' to 'destination'.
strcpy(destination, [1]);strcpy copies from source to destination, so source must be the second argument.
Fill both blanks to check if the first character of 'word' is 'A'.
if (word[1] == [2]) { // do something }
Use word[0] to access the first character and compare it with the character 'A' using single quotes.
Fill all three blanks to create a loop that prints each character of 'str' until the null character.
for (int i = 0; [1]; i++) { if (str[i] == [2]) break; printf("%c", [3]); }
The loop continues while str[i] is not the null character '\0'. We break if we find '\0'. We print str[i] as a character.
