Assignment 1 - CSC 222 - Section 2102 PDF
Assignment 1 - CSC 222 - Section 2102 PDF
College of Engineering
Jazan University
Kingdom of Saudi Arabia
Assignment-1
Last date of 29/03/2019 Max. Marks:
Programming Language (CSC-222)
submission: Sunday 15
Section-2102
1. Differentiate among Object, Variable and Constant in C++ Programming [1.5 Marks]
Object Variable Constant
2. Make necessary modification and correction in the program and rewrite it. [1.5 Marks]
#include<iostream>
using namespace std;
int main() {
P, Q;
cin << P;
Q = P;
M = P / Q;
cout << "O = " << Q << endl;
cout << "M = " << M << endl;
getch();
return(0);
}
3. Write the output of the following program. [1.5 Marks]
#include<iostream>
using namespace std; (i) The value =
int main()
{ (ii) The value =
int P = 15, Q = 5;
cout << "\n The value=" << P / Q;
(iii) The value =
6. Develop an application program in C++ that will prepare the Grade Sheet of students
with the following details: [6 Marks]
Input Output
i. Accept student’s ID. i. Display the ID of the student
ii. Accept the marks of each course he has ii. Display Total marks he scored out of all
taken in the current semester (for courses.
example the student has taken 4 courses). iii. Display the Scored Grade of the student.
Like :