What are the differences between a struct in C and in C++?
Answer Posted / shakti singh khinchi
In C, structures never support constructors and destructors
whereas C++ supports both of them.
Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
What is class invariant in c++?
What is abstract keyword in c++?
Explain rtti.
What is an inclusion guard?
Describe linked list using C++ with an example.
What do you mean by static variables?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
Explain the term memory alignment?
Can we run c program in turbo c++?
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
What is the best c++ ide?
What do you mean by function pointer?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include Can we use this pointer in a class specific, operator-overloading function for new operator? 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
and
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
And
Roll No Suject Highest
001 Math 98
007 Physics 84
021 Hindi 74
All 275
All information is kept in structure in main memory.
You have to find last two tables.