Question
Please click the following file to get string.c: https://drive.google.com/file/d/154WmYNMc0D9rY6a-im7KU2uk5VdWfIHk/view?usp=sharing This is how the program is built using gcc gcc -std=c99 -g -Wall -Wshadow string.c -o
Please click the following file to get string.c: https://drive.google.com/file/d/154WmYNMc0D9rY6a-im7KU2uk5VdWfIHk/view?usp=sharing
This is how the program is built using gcc
gcc -std=c99 -g -Wall -Wshadow string.c -o prog
This is how the program is run
./prog
Answer the following questions.
Hint: Pay attention to the output type (i.e., the format identifier in each printf statement).
For the second printf statement
printf("Output2: %d ", strcmp(arr1, arr2));
Which of the following is correct?
Question 14 options:
The output is 0 | |
The output is 1 | |
There is no output since the two strings are not comparable | |
The output is a negative number | |
The output is a random number as strings are not comparable | |
The output is -1 | |
The output is a positive number |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started