Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, Here are some multiple choice questions from my intro to programming course in C I would like the help with answers and an explanation

Hello, Here are some multiple choice questions from my intro to programming course in C I would like the help with answers and an explanation if you have one

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

int main(void) { int x = 10; if x >= 2 printf (" %d", x); return 0; } Error. The condition after if should always be in parenthesis. No Error int main(void) { int x = 10; if ( x >= 2 ) then printf (" %d", x); return 0; } O No Error. 'then' is correct usage. Error. 'then' cannot be used in C. int main(void) { int i = -3, j = 3; if (!i + !j* 1) printf(" statement1"); else printf (" Statement2"); return 0; } Statement2 Statement1 Statement1 Statement2 int main() { int i = 4, z = 12; if (i = 5 || 2 > 50 ) printf (" l am stmt1"); else printf(" l am stmt2"); return 0; } I am stmt1 I am stmt2 I am stmt2 O I am stmt1 int main(void) { int i = 4, j = -1, k = 0, y, z; y = i +5 &&j + 1 || k + 2; z = i +5 || | + 1 && k+ 2; printf (" y = %d z = %d", y, z); return 0; } 11 O 10 O Error 01 00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

=+ how might this lead to faster growth in productivity?

Answered: 1 week ago