What is the Difference between Class and Struct?

Answer Posted / ashish srivastava

by default
struct elements are public
while
class elements are private

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain continue keyword in c

586


What is the time and space complexities of merge sort and when is it preferred over quick sort?

676


what are the facialities provided by you after the selection of the student.

1658


string reverse using recursion

1812


What is the meaning of ?

621






What is optimization in c?

568


Is c is a middle level language?

597


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

720


What are compound statements?

629


What is the difference between Printf(..) and sprint(...) ?

789


Should a function contain a return statement if it does not return a value?

597


How do I swap bytes?

630


How can I write a function that takes a format string and a variable number of arguments?

605


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2337


What is merge sort in c?

644