0% found this document useful (0 votes)
37 views

Programing Using C

This document contains instructions for an assignment in C++ programming. It includes 4 questions with multiple parts each. Question 1 asks about programmer duties, high and low level languages, object-oriented programming, and object and source code. Question 2 covers C++ statements like preprocessors, main(), comments, return 0, and output. Question 3 asks students to write a program to capture and display names and phone numbers. Question 4 provides multiple programming problems to solve involving calculations, output formatting, and conditionals. The assignment is due on September 1st and must be printed, including any interfaces.

Uploaded by

Matutu Matutu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Programing Using C

This document contains instructions for an assignment in C++ programming. It includes 4 questions with multiple parts each. Question 1 asks about programmer duties, high and low level languages, object-oriented programming, and object and source code. Question 2 covers C++ statements like preprocessors, main(), comments, return 0, and output. Question 3 asks students to write a program to capture and display names and phone numbers. Question 4 provides multiple programming problems to solve involving calculations, output formatting, and conditionals. The assignment is due on September 1st and must be printed, including any interfaces.

Uploaded by

Matutu Matutu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PROGRAMING USING C++

ASSIGNMENT ONE
Due date 1 September 2023
Answer all questions
Question 1
a) Give three distinct duties of a programmer [4]
b) What are the high level languages and how do they differ from low level
programming languages [4]
c) C++ is considers to object oriented programming language. What do you
understand by this statement
d) Explain the terms object code and source code [4]
Question 2
a) What is the purpose of each of the following in C++ programming
i. Pre-processor directive [2]
ii. Main() [2]
iii. Comments [2]
iv. Return 0; [2]
v. {} [2]
b) What is the effect of the following in C++ statement?
i. ; [2]
ii. Int age; [2]
iii. \n [2]
iv. Cout [2]
v. Cin [2]
Question 3
a) Three students wants a program that captures their names and telephone
numbers and then displays a console screen. Write a program for them [10]
b) Clearly explain and show an example a syntax error and semantic error [5]
PROGRAMING USING C++
Practical Assignment One
70 Marks Due Date 1 SEPTEMBER 2023
*Must Be Printed Including Interfaces
Question one
a) Write a C++ program to find maximum between two numbers. [5]
b) Write a program to print My first C++ program at Oasis Commercial School on
screen. [5]
c) b. Write a program to display the following output using a single cout statement.
[5]
Subject Marks
Mathematics 90
Computer 77
Chemistry 69
d) Write a C++ program to check whether a year is leap year or not.[5]
Question two
a) Write a C++ program to input week number and print week day.[5]
b) Write a C++ program to input month number and print number of days in that
month.[5]
Question three
a) Write a C++ program to input angles of a triangle and check whether triangle is
valid or not.[10]
b) Write a C program to check whether the triangle is equilateral, isosceles or
scalene triangle. [10]
Question four
Write a C++ program to input marks of five subjects Physics, Chemistry, Biology,
Mathematics and Computer. Calculate percentage and grade according to
following:[20]
Percentage >= 90% : Grade A
Percentage >= 80% : Grade B
Percentage >= 70% : Grade C
Percentage >= 60% : Grade D
Percentage >= 40% : Grade E
Percentage < 40% : Grade F

You might also like