Question: In C Question 4 1 pts Consider the following code #include #include int main(void) char buf[ 100], word[ 20], num [ 20]; int course =

In C

In C Question 4 1 pts Consider the following code #include #include

Question 4 1 pts Consider the following code #include #include int main(void) char buf[ 100], word[ 20], num [ 20]; int course = 0; CODE A return 0 Which of the following replacements for CODE A produce the following output when the program input is "CS 354"? CS 354 1. CODE A is: fgets (buf, sizeof (buf), stdin); sscanf (buf, "%s %d", word , course); printf("%s %d ", word, course); 2. CODE A is: fgets (buf, sizeof (buf), stdin); sscan f (buf, "%s %s", word, num); printf ("%s %s ", word, num); 3. CODE A is: fgets (buf, sizeof (buf), stdin); sscanf ( buf, "%s %d", word, &course); printf("%s %d ", word, course); 4. CODE A is: fgets (buf, sizeof (buf), stdin); sscanf (buf, "%s %s", &word, &num); printf ("%s %s ", word, num); o 4 only O 1 and 3 o 1 only 2 only 2 and3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!