Consider these two string variables: char str1[] = “compute… Consider these two string variables: char str1[] = “computer”; char str2[ 20 ]; How do you assign str1 to str2 so that both strings have the same characters? Read Details
What is the output of the following code? int n;for( n = 9… What is the output of the following code? int n;for( n = 9; n!=0; n– ){ printf(“%d “, n–); } Read Details
What is the value of the result at the end of this code bloc… What is the value of the result at the end of this code block? char str[] = { ‘1’, ‘2’, ‘3’, ‘4’, ‘\0’ }; int result = strlen( str ); Read Details
What does the following relational expression evaluate to in… What does the following relational expression evaluate to in C? 15 > 39 Read Details
What should the parameters for the main function be in C? What should the parameters for the main function be in C? Read Details
Which of the following statements is not true about booleans… Which of the following statements is not true about booleans in C? Read Details
What is the output of the following code? int i = 0;for (i… What is the output of the following code? int i = 0;for (i = 0; i < 20; i++){ switch(i){ case '0': i += 1; case '1': i += 2; case '5': i += 3; default: i += 4; break;}printf("%d ", i); } Read Details
Which is the correct way to declare a for loop in C? Which is the correct way to declare a for loop in C? Read Details
True or False? The following code is how you’re supposed to… True or False? The following code is how you’re supposed to compare two strings? if( str1 == str2 ) { printf( “These two strings are equal.\n” ); } Read Details