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.
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
help me i need a c++ program which takes sequesnce
of characters and outputed sequence of their token taypes,
work same compiler in lexical analysis phase
write a program to find 2^n+1 ?
What is byval and byref? What are differences between them?
write a porgram in c++ that reads an integer and print the
biggest digit in the number
Write a program using GUI concept for the scheduling
algorithms in Operating system like SJF,FCFS etc..
Get me an image implementation program.
Write a program to sort the number with different sorts in
one program ??
what is scupper?
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();
officer say me - i
am offered to a
smoking , then what
can you say
why reinterpret cast is considered dangerous?
Q1. A. What is unary operator? List out the different
operators involved in the unary operator.
B. What is an adjust field format flag?
Q2. A. Distinguish between a # include and #define.
B. Can a list of string be stored within a two
Q3. A.Explain how a pointer to function can be declared in
B.List the merits and demerits of declaring a nested
class in C++?
Q4. A. What are the syntactic rules to be avoid ambiguity
in multiple inheritence?
B. Explain the operation of overloading of an
Q5. A. Explain how the virtual base class is different
from the conventional base classes of the opps.
B. Explain how an exception handler is defined and
invoked in a Program.
Q6. A. What is a binary file? List the merits and demerits
of the binary file usagein C++.
B. Write short notes on Text Manipulation Routines.
C. Write bites in Turbo c++ Header (“Include”) Files.
Given the following seqment of code containing a group of
nested if instructions: y = 9; if ((x==3) || (x == 5)) y++;
else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8;
if the value of x is 4 before the nested IFs are executed,
what is the value of y after the nested IFs are executed?
Write a program to read the data and evaluate the results of
the election. Print all output to the screen.
Your output should specify:
The total number of votes, the number of valid votes and the
number of spoilt votes.
The winner(s) of the election. Hint: An appropriate search
should be used to determine the winner(s).
The votes obtained by each candidate sorted in terms of the
number of votes obtained. Hint: An appropriate sort should
be used to sort the candidate(s).
The Source code should be saved as VotingSystem.
Candidates’ Names and Numbers
2501 Victor Taylor
2502 Denise Duncan
2503 Kamal Ramdhan
2504 Michael Ali
2505 Anisa Sawh
2506 Carol Khan
2507 Gary Owen
3 1 2 5 4 3 5 3 5 3 2 8 1 6 7 7 3 5 6 9 3 4 7 1 2 4 5 5 1 4 0
Invalid vote: 8
Invalid vote: 9
Number of voters: 30
Number of valid votes: 28
Number of spoilt votes: 2
2503 Kamal Ramdhan
2505 Anisa Sawh
2503 Kamal Ramdhan 6
2505 Anisa Sawh 6
2501 Victor Taylor 4
2504 Michael Ali 4
2502 Denise Duncan 3
2507 Gary Owen 3
2506 Carol Khan 2