where is memory for struct allocated?
where is memory for class-object allocated?
I replied for struct in stack and for class-object in heap.
THen he asked if class has struct member variable what
happens.class on heap and what about struct in that class?
couldnt ans :( :-?
Write a C program to calculate the salary of each employee
in your company. You
need to input the hours worked and the hourly rate. The
company pays 1.5 times
the hourly rate for all hours worked in excess of 48 hours.
Use the formulas below
to calculate the salary:
if employee worked less than 48 hours
salary = hours * rate;
if employee worked more than 48 hours
salary = 48.0 * rate + ( hours − 48.0 ) * rate * 1.5;
You are required to use a loop to produce the sample output
as given below.
explain sub-type and sub class?
atleast u have differ it into 4 points?
Write a program which is required to process the time of a
clock in hours and minutes, entered from the keyboard. With
this program, there are two requirements for any data
entered by a user:
1. The data must be of the correct type (in this case, two
2. The data must be in the correct range: this means that,
for the minutes, negative numbers and any number above 59
must be rejected; for the hours, negative numbers and any
number above 23 must be rejected.
Output error message for invalid data input.
Output the time one and a half hour after the time input.
One and a half hour after 22:32 is 00:02
There are 100 students in a class. The management keep
information in two tables. Those two tables are given like
Roll no Name Age
001 ABC 15
002 XYZ 14
Roll No Subject Marks
001 Math 75
001 Physics 55
002 Math 68
001 Hindi 69
They want the information like this
Roll No Name Hindi Physics Math Total
001 ABC 69 55 75 199
002 XYZ 68 74 84 226
Roll No Suject Highest
001 Math 98
007 Physics 84
021 Hindi 74
All information is kept in structure in main memory.
You have to find last two tables.
Give two or more real cenario of virtual function and
I have One image (means a group photo ) how to split the
faces only from the image?............ please send the
answer email@example.com thanks in advace...
design a c++ class for the chess board,provide a c++ class
definition for such class(only class definition is required)
write a corrected statement so that the instruction will
work properly. if (4 < x < 11) y = 2 * x;
In inline " expression passed as argument are evalauated
once " while in macro "in some cases expression passed as
argument are evaluated more than once " --> i am not getting
it plz help to make me understand....
write asingle linked list which read from two list & the do
1 sort the prime & nonprime num (prime should be less tn
2 each node has a prime num followd by nonprime
3 add a new node into its sutable plce
4 erase the most three duplicated non prime num
5 find the least duplicated prime num
Is there any error below, its a code to delete all entires
from a map
int i =0;
map <int, char> TestMap;
typedef map<int, char> :: iterator mapIter =TestMap.begin();
Write a program to compute for numeric grades for a course.
The course records are in a file that will serve as the
input file. The input file is in exactly the following
format: Each line contains a student's first name, then one
space, then ten quiz scores all on one line. The quiz scores
are in whole number and are separated by one space. Your
program will take it input from this file and sends it
output to a second file. The data in the output file will be
exactly the same as the data in the input file except that
there will be one additional number (of type double) at the
end of each line. This number will be the average of the
student's ten quiz scores. Use at least one function that
has file streams as all or some of its arguments.
write a c++ program to create class student having
datamember name,Roll_no,age,and branch intilcization all the
member using constructor print the all the details on the
What is expression parser in c++
write a C++ program for booking using constructor and