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

Assignment 1

The document outlines an assignment for CPP programming that includes creating a C file and a C++ file with an employee struct containing empID, empName, and empSalary, along with functions to accept and print employee data. It also requires function overloading for an 'Add' function that can handle various combinations of integers and floats, as well as a function with default arguments and an inline function to calculate the area of a triangle. The assignment spans from August 2024 to January 2025.

Uploaded by

Arohi Patile
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)
49 views2 pages

Assignment 1

The document outlines an assignment for CPP programming that includes creating a C file and a C++ file with an employee struct containing empID, empName, and empSalary, along with functions to accept and print employee data. It also requires function overloading for an 'Add' function that can handle various combinations of integers and floats, as well as a function with default arguments and an inline function to calculate the area of a triangle. The assignment spans from August 2024 to January 2025.

Uploaded by

Arohi Patile
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

CPP - Assignment 1

1.
Write a .c file having a employee struct contains
empID , empName, empSalary , and two function
AcceptData and printEmpData . and call these
function in main()

2.
Write a .cpp file having a employee struct
contains empID, empName, empSalary , and two
function AcceptData and printEmpData. and call
these function in main()

function overloading

3.
write a function 'Add' which is able to add

3 int value and 1 float value


2 int value and 2 float value ,
1 int value and 3 float value,
4 int value ,
4 float value,
1 char value and 3 float value.

August 2024– January 2025 1


CPP - Assignment 1

default argument
4.
write a function that has the default values for
multiple parameters. Call the function where the
parameters will use the default values and where
the values will be passed to the function.

inline functiom
5.
Write a inline function to calculate area of
triangle. Input base and Height from user and print
the result.

August 2024– January 2025 2

You might also like