What is the difference between structure and class?
Answer / Prashantkumar
In C++, both structures (struct) and classes are user-defined data types, but they have some differences:nStructures by default have public members and are primarily used for grouping data together. Classes have both public, private, and protected members and provide additional features like inheritance, polymorphism, and encapsulation.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a string example?
What is object file? How can you access object file?
What is scope in c++ with example?
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
Is c++ vector dynamic?
What is the difference between while and do while loop? Explain with examples.
What is a pointer how and when is it used?
What is name mangling?
Tell me can a pure virtual function have an implementation?
When do we run a shell in the unix system? How will you tell which shell you are running?
Design a program to input a date from user in the form day/month/year (e.g. 2/6/2000) and report whether it’s a valid date or not. The program should take account of leap years. You will need to know that a leap year is a year that is exactly divisible by 4, except that century years are only leap years if they are divisible by 400.
Differentiate between an array and a list?