Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer all Q 3. Conditional Operator (1 mark) If you are asked to create a C program that accepts the number of credits a student

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed answer all Q
3. Conditional Operator (1 mark) If you are asked to create a C program that accepts the number of credits a student has completed and then, depending on the table below, shows the correct level using the conditional operator, which program line do you use below? Number of Credits Completed Level 1-30 Diploma 31-45 Advanced Diploma Bachelor 46-60 A. credit=46?printf("Bachelor").credit>=31?printf("Advanced Diploma"); printf("Diploma"); C. credit int main() int X 15, y - 43 Y+x: printf("After incrementing by it * - \d \ * Y: *--*: printf("After decrementing by 1: * -kd - edin.x, y): return O After incrementing by 1: x = 16 y = 16 After decrementing by 1:* = 15 y = 15 O After incrementing by 1: x = 16 y = 4 After decrementing by 1: x = 14 y = 4 O After incrementing by 1: x = 16 y = 5 After decrementing by 1:x = 14 y = 3 O After incrementing by 1:X = 15 y = 15 After decrementing by 1:x = 16 y = 16 worde Enths Simboli 1. Precedence of Operators (1 mark) Operator predence the order than to see are image of the contentsprecoce Precedence Operator / Description Associativity 1st 2nd 3rd 4th 5th LG PARODOS Operator precedence the order aan operatoris executed Amange each image of the operator based on its precedence (mar Precedence Tot Operator / Description Associativity 2nd 3rd 4th 5th und

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions