Question

2. If grade has the value of 60 what will the following code print? if (grade >60) printf(Passed); 5 (1 Point)

Which of the following is not a valid integer value? (1 Point) (a) -3 (b) 0.0 (c) 2134859 O (d) 1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer for the first question:

if the grade is 60 it will not enter into the inside the loop.because,

60 > 60 is not true.it will always..so the condition is false it will not go to inside loop and it will not execute the code printf("passed)

Add a comment
Know the answer?
Add Answer to:
2. If grade has the value of 60 what will the following code print? if (grade...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What is the value of GPA when grade is 'B' in the following code segment? int...

    What is the value of GPA when grade is 'B' in the following code segment? int GPA=0; switch (grade) { case 'A': case 'a': GPA = GPA + 1; case 'B': case 'b': GPA = GPA + 1; case 'C': case 'c': GPA = GPA + 1; case 'D': case 'd': GPA = GPA + 1; } 4 3 2 1 None of the above #2.   Branching - switch statements... Extra info/hint? It's free What is the value of GPA when...

  • 10 What does the last printf in this code print to the screen? a)n-7 b)n- 0...

    10 What does the last printf in this code print to the screen? a)n-7 b)n- 0 c)n--1 d) None of the above 鬐include< stdio. h> int main) int n-0 for (n-7: n<O; n-- printf (n") printf ("n *%d", n); - return 11-What does the code print to the screen? 鬐include< stdio.h> void fun (int) int main) b) 8 d) None of the above fun (3) return void fun (int a) int x-10 while(a !_ 3 x > s} if a...

  • 5) What is the value of the variable answer after the code segment below completes? int...

    5) What is the value of the variable answer after the code segment below completes? int a, b, c; answer, a 3*b: b 5 10: c (a a b*b) / (c*c) answer = A).5 B) 2 C) 2.5 D) 250 ENone of the Above 8) What is the output of the following segment of code? int a 7, b= 3, c = 6 if (a> b c) printf"A"); if (b > a - с) printf ("B"); else printf("C") if (atb...

  • QUESTIONS What will be the output of the following C code? 1. #include <stdio.h> int maino...

    QUESTIONS What will be the output of the following C code? 1. #include <stdio.h> int maino int 1 - -3; int k - * % 2; printf(\n", k); Compile time error O-1 Implementation defined

  • Code goes like: #include <stdio.h> /* * askGrade(): * Asks the student for a letter grade...

    Code goes like: #include <stdio.h> /* * askGrade(): * Asks the student for a letter grade * (A = 90-100, B = 80-89, etc.) * then gives the appropriate letter grade in upper case. */ void askGrade() { int grade;    printf("Enter your grade:"); scanf("%d", &grade);    printf("Your grade is: ");    // BEGIN YOUR CODE    // TODO: Use if-else statements to print the right letter grade.    // END YOUR CODE    printf("\n"); } /* * dayOfTheWeek(): *...

  • 2. Use the following code to list the contents of the binary tree. void print_tree(binarytree T)...

    2. Use the following code to list the contents of the binary tree. void print_tree(binarytree T) if (!is_empty(T)) f print_tree (T->left); printf("%d\n", T->data); print tree (T->right); JKL M) (N)

  • What is wrong with the following code that prints out the elements of a 2x3 array?...

    What is wrong with the following code that prints out the elements of a 2x3 array? for (int i 0; i < 3; ++i) { for (int j = 0; j < 2: ++j) { printf("x(%d] [%d] ". %.2f\n", i, j, x[i][j]); O Expression ali]li] is incorrect O There is nothing wrong with the code 0 %2t is invalid O It is printing for a 3x2 array

  • 7 - What does the code print to the screen? float x(float) 7/3; printf ( "...

    7 - What does the code print to the screen? float x(float) 7/3; printf ( " % .2 f", x); a) 7/3 b) 2.50 c) 2.00 d) None of the above a) TRUE b) FALSE c) TRUEFALSE d) None of the above 8 - What does the code print to the screen? int x3; if (x >31x!-2 printf ("TURE") printf ("FALSE"); 9What does the code print to the screen? a) TRUETRUE b) TRUE c) TRUETRUETRUE d) TRUETRUETRUETRUE e) None of...

  • What is the value of x after the following code executes? intx=10; if(x++ >10) x=13; 0...

    What is the value of x after the following code executes? intx=10; if(x++ >10) x=13; 0 b. 9 0 C. 13 0 0 Which of the following is not a valid identifier? O a. return O b. mylnt O c. myInteger O d. total3 If you want a loop to quit iterating if x < 10 and y > 3, what would be the proper loop condition test? O a. x < 10 && y > 3) b. (x >10...

  • Question 1Which of the following statements is syntactically correct in C? A)  print("Winter is coming."); B)  printf("Winter "+"is"+”coming.”);...

    Question 1Which of the following statements is syntactically correct in C? A)  print("Winter is coming."); B)  printf("Winter "+"is"+”coming.”); C)  printf(Winter is coming.); D)  printf("Winter is coming."); E)  None of the Above Question 2 What is the percent code used in scanf for an character? A) %c B) %f C) %d D) %lf E) None of the Above Question 3 What is the value of the following arithmetic expression? 80 – 3 * 12 + 21 / 3  ​ A) 315 B)  37 C)  47 D) 24 E)  None of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT