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 |
how to convert binary to decimal and decimal to binary in C lanaguage
7 Answers BPO, Far East Promotions, IBM, RBS,
#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }
12 Answers Capital IQ, Sasken,
Write a pro-gramme to determine whether the number is even or odd?
What will happen when freeing memory twice
What is the scope of global variable in c?
Differentiate fundamental data types and derived data types in C.
f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output?
9 Answers Hughes, Tech Mahindra,
What is the purpose of main( ) in c language?
a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static Which of the Following Statements are true w.r.t Bit-Fields A)a,b&c B)Only a & b C)Only c D)All
3 Answers Accenture, Digg.com,
Why we use conio h in c?
write a program to remove duplicate from an ordered char array? in c
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples