The compiler returns the following error, what does it indicate? error: expressi
ID: 3698087 • Letter: T
Question
The compiler returns the following error, what does it indicate? error: expression must be a modifiable Ivalue 0 You tried to assign an rvalue to an lvalue You tried to compare an rvalue to an lvalue I probably tried to perform an assignment to a something that doesn't possess a memory address This compiler is wrong and my code is correct! I should find a compiler that agrees with my bad coding practices Save Question 17 (Mandatory) (2 points) Why do you not want to use gets) to directly accept user input in c99? O It leads to buffer underrun problems Its not safe when using parallel programming paradigms, ie: there are write conflicts to the same memory space with multiple things trying to write at the same time to the same place Its fine, your instructor is just being paranoid It leads to buffer overflow problems Question 18 (Mandatory) (6 points) The following code snippet uses gets) choose the option that replaces gets with fgets() #include int main() char str [50]; printf("Enter a string gets (str); printf ("You entered: %s", str); return (0); # include #de fine BUFFER 50 int main() char str[ BUFFER]; printf ("Enter a string "); gets (str); printf ("You entered: %s", str); return (0) #include int main() char str[50] O printf ("Enter a string " fgets (str,50,stdin); printf ("You entered: %s", str); return (0) #include define BUFFER 50 int main() char str[BUFFER] printf("Enter a string" fgets (str, BUFFER, stdin); printf ("You entered: %s", str); return (0) #include int main() char str [ BUFFER] O printf ( "Enter a string "); fgets (str); printf ("You entered: return (0) s", str); #include #de fine BUFFER 50 int main() char str [BUFFER]; printf("Enter a string " gets (str, BUFFER, stdin); printf( "You entered: %s", str); return (0);Explanation / Answer
16. C
17. D
18. B , C
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.