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 |
Why is c fast?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
Who invented bcpl language?
Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.
How to implement call back functions ?
write a program to search for an element in a given array. If the array was found then display its position otherwise display appropriate message in c language
What is key word in c language?
what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....
i want to job in your company, so how it will be possible.
What does static mean in c?
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?