Explain with an example how one predefined data type can be converted to a user defined data type.
“Smartdata pvt. ltd” company is storing the information of their employees( Name, Department DOB,Gender, address, email and Mob) in different entity according to department of employee. Now, one employee will be shifted from “programing team” to testing team. Write a code to copy all the details of that employee from one object to another object. Note: Display the above concept with the help of classes and copy constructors
Input
aaaammmmyyyy
aamy am amy ammmy
output
3
Explanation: Line 1(Red font) - Represents stretched word NextLine(Black font) -List of Query words Explanation: The Stretched string contains a’s - 4, m’s - 4, y’s - 4 count of all alphabets in sequence > 3 So the query words should contain all the alphabets with count of each one is at least 1 aamy amy ammmy - are the words which satisfies the given criteria. am - ‘y’ is missing
Hence output - 3
Create a class named as car with
data members as
carcompany,cost of car,number
of airbags. Create a file and write
the array of objects into file.
Search the data by carcompany
from the stored file and display
the result
Explain the difference between
constructor and initializer list. [
Class to class conversion can be
done in source as well as
destination class. write a
program to support this.
Param is a course instructor of
c++ programming and currently
he is teaching conversions to his
students. He started with the
basic programs and now he
want to introduce some
complex problems. Before
starting the complex problems,
he wants to start with high
difficulty level problem, such as:
counting the digits of a number.
Help Mr. param to write a
program which will accept one
integer argument and returns
count of digits of that argument
using class to basic conversion.
“Smartdata pvt. ltd” company is storing the information of their employees( Name, Department DOB,Gender, address, email and Mob) in different entity according to department of employee. Now, one employee will be shifted from “programing team” to testing team. Write a code to copy all the details of that employee from one object to another object. Note: Display the above concept with the help of classes and copy constructors.
of systems which developed using INCREMENTAL MODEL