This is for C programming: I am having a hard time trying to figure out what to
ID: 3600163 • Letter: T
Question
This is for C programming: I am having a hard time trying to figure out what to use for my if statement for this part of my code. Your assistance would be greatly appreciated. Thank you.
int main (int argc, char* argv[]) int size, i; char order; //user has enter nothing in command prompt if // greet and read data // greet and get the stock values print_greeting O printf ("How many stocks prices would you like to analyze? ") scanf ("%d", &size;); // read the data float array[size]; read array (array, size)Explanation / Answer
Answer:-
In your code, there is if statement without braces (expression),then it will give an error and nothing is execute in further section.
if you want to corrrect them then you have to write code like if(argc>0), then your code run correctly and you can achive your need.
otherwise it will return
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.