1. Define a class.
Answers were Sorted based on User's Feedback
Answer / mayank kumar
class is a user defined data type and it is the collection
of element. it contains two things
data member and member function.
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / nature
class is a user defined data type and it is the collection
of element
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / bijaya kumar jena
Class is a user defined data type. It is the collection of
data member and member function.
Ex:-
Class Add
{
private:
int n1,n2; //Data member
public:
res() //Member Function
{
cout<<"Result :";
}
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort
Can we create object of class with private constructor?
Can an interface inherit a class?
write a program to print * * * * * *
write a program to find 2 power of a 5digit number with out using big int and exponent ?
What is the difference between pass by reference and pass by value?
is java purely oop Language?
49 Answers HCL, Infosys, TCS,
different types of castings
What is cohesion in oop?
What is a friend function & its advantage?
Contrast OOP and SOA. What are tenets of each?
1 Answers Siebel Systems, Wipro,
#include <iostream> using namespace std; int main() { int a = 3; int c[5][5]; for (int x=0;x<5;x++) { for (int y=0;y<5;y++) { c[x][y] = x*y; } } cout << c[a][2]; }