What is the difference b/w Structure & Class?
Answers were Sorted based on User's Feedback
Answer / srilatha
1.structure contains only data members.
class contains data members and member functions.
2.in structures we can use keyword struct.
in classes we can use keyword class.
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / mohan chaudhari
1.In structure there is no data encapsulation.
but in class, there is data encapsulation.
2.Data member in structure are not private .
In class they are private.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / alekhya
1.in structure we have only data members where as
in class we have members and member functions
2.in class we declare members with access specifiers like
private,public...
in structs we dont have any access specifiers all the
members of structure are pubic
Is This Answer Correct ? | 1 Yes | 0 No |
A program to allow an input operand and operator from the operator and read on the display and output operand.
What is the difference between text and binary i/o?
What are valid signatures for the Main function?
What is use of null pointer in c?
Explain how do you search data in a data file using random access method?
What is true about the following C Functions a.Need not return any value b.Should always return an integer c.Should always return a float d.Should always return more than one value.
Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code
What's the difference between a linked list and an array?
What are conditional operators in C?
c program to manipulate x=1!+2!+3!+...+n! using recursion
Is it valid to address one element beyond the end of an array?
How variables are declared in c?