Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sore the marce fille in a new folder tak4 as Labdirprograni + 5 A includeratdio_bo lot maln &vpldt ist, monthd dcant d1d2+ insnthbz if {

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Sore the marce fille in a new folder tak4 as Labdirprograni + 5 A includeratdio_bo lot maln \&vpldt ist, monthd dcant d1d2+ insnthbz if { nonth =1.1 Erint f= fanuary'thej a dae if inonth =in pelntef cFebtuaty'n'm i clise 1 f. Cronth +33 potnef ("Wareblant) a wite if inontb on 4). wite 1. itiofth m sh Printef ( mitsyln= 1d nine if fonth, wis Pieinte c sonehn*ud tils if twonth = 7) olse if [tonth w B] tilet 1f. Lnofiti m 9.93 Printif x Itptenber (n1) - Lad it encith an 10 of olte it inonth ma it . oIne if inonth =m 121 pulnte c"becertber'(n)|; cias Frintifinyen motered wrang month 11m if tetutn 0d 2. Cive a sample dutput ul the poopram pestod if atatrmed Qlerryations! shaw wh, as er Linter aly 2. Give a anple Dueser af the propam neviced if thatrment. OVerratwes: Sue ivs. Mr ef criner ity Compile and detur the program Coucrve value of the varub te moch after the cuochin of the fort if stakmoint (i.4., if cmant Nete: fenter ab. Task 1: if statement: One/Two alternatives 1. Write Compile \& Run the following C program in Dev-C++. Save the source file in a new folder Lab4 as Lab4/program1.c printf("Please Enter a Month as a number between 1 and 12 : 2. Give a samnle Outnut of the nrooram 3. Run the Debugger on the program several times and write down your observations regarding 4. Note than for checking equality we used double equal sign = (not a single equal = ) ( See Slide \#15, \#51 of Lecture \#3) Replace the double equal sign == by a single equal (remember that the single equal sign is the assignment operator!). Save the modified program as Lab4/program1 . c Compile and debug the program. Observe value of the variable moth after the exection of the first if statement (i.e., if (month = 1) ) as well as the execution flow of the program! Note: In C, 0 means FALSE and any non-zero value means TRUE (See Slide \#14, \#18-20, \#51 of

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

More Books

Students also viewed these Databases questions

Question

Discuss the states of accounting

Answered: 1 week ago

Question

Writing a Strong Introduction

Answered: 1 week ago