difference between structure and union.
Answer Posted / siva sankari
struct employee
{
int a[20];// for tis size 20 was allocated in memory
char text;// for tis only 1byte of memory space is allocated
}
so totally 21 in size was allocated in memory space
union employee
{
int a[20];// for tis size 20 was allocated in memory
char text;// for tis only 1byte of memory space is allocated
}
but in union it takes only the maximum memory space so for each 20space totally 40 size was allocated in memory space
Is This Answer Correct ? | 7 Yes | 12 No |
Post New Answer View All Answers
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
hi all..i want to know oops concepts clearly can any1 explain??
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is pointer in oop?
How do you explain polymorphism?
Why do we use oops?
What is destructor oops?
Can you inherit a private class?
How to call a non virtual function in the derived class by using base class pointer
Is abstract thinking intelligence?
What is the real time example of encapsulation?
What is cohesion in oop?
What is abstraction in oops?
What is a null tree?