Difference between Class and Struct.

Answer Posted / naresh kukreti

1)measure difference between structure and class is that
the structure doesn't inherit but class is inherit
2)by default the data members of structure are public but in
case of class data members are private
3) Class is much secure ,but structure is not secure

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

811


Write a program to swap two numbers without using a temporary variable?

831


What are comments and how do you insert it in a C program?

947


string reverse using recursion

2057


What are unions in c?

753


Is there anything like an ifdef for typedefs?

877


What happens if a header file is included twice?

771


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

2206


Why static is used in c?

810


What is difference between %d and %i in c?

886


code for find determinent of amatrix

1721


Explain the difference between ++u and u++?

821


What is pointer to pointer in c language?

782


What are the c keywords?

938


Explain what happens if you free a pointer twice?

787