What is the Difference between "C structure" and "C++
structure"?

Answer Posted / jayesh pawar

1)In "C++" Structure we can specify the data and functions as public,private or protected but in "C" Structure we can't.

2)In "C" Structure Variable initialization must contains the keyword struct but in C++ not required.

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of setfill in c++?

678


Why can templates only be implemented in the header file?

750


What are pointers used for c++?

671


Difference between struct and class in terms of access modifier.

800


A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

1825






Write a program to add three numbers in C++ utilizing classes.

721


What is function overloading in C++?

812


What does it mean to declare a member function as virtual?

667


Is c++ vector a linked list?

647


What do you mean by volatile and mutable keywords used in c++?

676


What is lvalue?

779


What is private inheritance?

680


Which software is best for programming?

752


Explain the difference between using macro and inline functions?

686


What is the full form of stl in c++?

786