0% found this document useful (0 votes)
40 views2 pages

1 Assignment For Bca and BSC - It

BCA/B.Sc IT students must submit their assignments by 14/04/2025 in a specific notebook designed for assignments. Late submissions are not accepted without valid proof, and plagiarism will result in zero marks. The document outlines five assignment questions related to C++ programming basics, including program structure, namespaces, variable types, operators, and identifier validity.

Uploaded by

ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

1 Assignment For Bca and BSC - It

BCA/B.Sc IT students must submit their assignments by 14/04/2025 in a specific notebook designed for assignments. Late submissions are not accepted without valid proof, and plagiarism will result in zero marks. The document outlines five assignment questions related to C++ programming basics, including program structure, namespaces, variable types, operators, and identifier validity.

Uploaded by

ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Important Instructions for All BCA / B.

Sc IT Students
• All students must submit their assignment on 14/04/2025.
• The assignment must be written in a separate Notebook purchased
specifically for assignments.
The Notebook should have ruled lines on the right side and plain
space on the left side.
• All future assignments will be maintained in the same assignment
Notebook, so purchase accordingly.
• Late submissions will not be accepted unless there is a valid reason with
proof.
• Plagiarism or copying from other students may lead to zero marks.
• Write each question clearly and answer them in your own words with
example programs.

Unit 2 Assignment Questions – C++ Programming Basics


1. Explain the structure of a C++ program with an example.
o Write a simple program that takes two numbers as input and
displays their sum.
2. What is a namespace in C++?
o Describe its use with an example using the std namespace. Also,
explain what happens if we don’t use a namespace in a program.
3. Differentiate between variables, constants, and enumerations in C++.
o Write a C++ program to declare each of these and demonstrate
their usage with appropriate examples.
4. Write a C++ program using different types of operators (arithmetic,
relational, logical).
o Explain how typecasting is used in your program.
(Example: Casting float to int or vice versa)
5. Identify valid and invalid identifiers in the following list. Give reasons
for your answers.
int 2value;
float _amount;
char name@;
double rate_of_interest;
string firstName;

You might also like