This document outlines 15 programming assignments related to the C programming language. It includes tasks such as discussing the history of C, explaining the steps of program execution in C, listing common errors in C, and writing programs to calculate areas and perimeters of shapes, reverse numbers, determine if a driver is eligible for insurance, and identify if a year is odd or even. Students are asked to write programs to demonstrate concepts learned and solve problems involving input, output, operators, conditional statements, and other core C programming elements.
This document outlines 15 programming assignments related to the C programming language. It includes tasks such as discussing the history of C, explaining the steps of program execution in C, listing common errors in C, and writing programs to calculate areas and perimeters of shapes, reverse numbers, determine if a driver is eligible for insurance, and identify if a year is odd or even. Students are asked to write programs to demonstrate concepts learned and solve problems involving input, output, operators, conditional statements, and other core C programming elements.
This document outlines 15 programming assignments related to the C programming language. It includes tasks such as discussing the history of C, explaining the steps of program execution in C, listing common errors in C, and writing programs to calculate areas and perimeters of shapes, reverse numbers, determine if a driver is eligible for insurance, and identify if a year is odd or even. Students are asked to write programs to demonstrate concepts learned and solve problems involving input, output, operators, conditional statements, and other core C programming elements.
Introduction to Computers and Programming in C 1. Discuss the History of our Programming Language. 2. Enlist the steps of program execution in C. Explain in detail. 3. List the name of commonly found errors in C. Give example of each. 4. Describe the characteristics of writing a good program. 5. Write the Applications and features of C. 6. Write a short note on data types in C. 7. Explain all the operators discussed in C with the help of examples. 8. (a.)Find the output of the following program? Explain the output.
(b.) #include<stdio.h> int main(){ int x = 3; float y = 3.0; If(x == y) printf("x and y are equal"); else printf("x and y are not equal"); return 0; }
A. x and y are equal B. x and y are not equal C. Unpredictable D. No output
(c.) int main() { float pi=3.14, x=3.7; int a, b; a= ( pi = = 3.14); b= (x = = 3.7); printf(%d %d, a, b); return 0; }
(d.) void main() { int a, b, c; a = 10, b=20, c=30; b += a; c -= a; printf (\n %d %d %d, a, b, c); }
9. WAP that read three numbers and display the largest of them. 10. The length and breadth of a rectangle and radius of a circle are input through the keyboard. WAP to calculate the area and perimeter of the rectangle, and the area & circumference of the circle. 11. Two numbers are input through the keyboard into two locations P and Q. WAP to interchange the contents of P and Q. 12. If a five-digit number is input through the keyboard, WAP to reverse the number. 13. If a five-digit number is input through the keyboard, WAP to calculate the sum of its digits. 14. A company ensures its drivers in the following cases: - If driver is married, - If the driver is unmarried, male and above 30 years of age. - If the driver is unmarried, female and above 25 years of age. In all other cases, the driver is not insured. If the marital status, gender and age of the driver are the inputs, WAP to determine whether the driver is to be insured or not. 15. Any year is input through the keyboard. WAP to find out whether it is an odd number or even number. [ Hint: Use of % (modulus) operator ]
Microsoft PowerPoint Guide for Success: Learn in a Guided Way to Create, Edit & Format Your Presentations Documents to Visual Explain Your Projects & Surprise Your Bosses And Colleagues | Big Four Consulting Firms Method
Microsoft 365 Guide to Success: 10 Books in 1 | Kick-start Your Career Learning the Key Information to Master Your Microsoft Office Files to Optimize Your Tasks & Surprise Your Colleagues | Access, Excel, OneDrive, Outlook, PowerPoint, Word, Teams, etc.
Learn Python Programming for Beginners: Best Step-by-Step Guide for Coding with Python, Great for Kids and Adults. Includes Practical Exercises on Data Analysis, Machine Learning and More.
Microsoft Excel Guide for Success: Transform Your Work with Microsoft Excel, Unleash Formulas, Functions, and Charts to Optimize Tasks and Surpass Expectations [II EDITION]
Microsoft OneNote Guide to Success: Learn In A Guided Way How To Take Digital Notes To Optimize Your Understanding, Tasks, And Projects, Surprising Your Colleagues And Clients
The Complete HVAC BIBLE for Beginners: The Most Practical & Updated Guide to Heating, Ventilation, and Air Conditioning Systems | Installation, Troubleshooting and Repair | Residential & Commercial
The Advanced Roblox Coding Book: An Unofficial Guide, Updated Edition: Learn How to Script Games, Code Objects and Settings, and Create Your Own World!