What is difference between #define and const?
Answers were Sorted based on User's Feedback
Answer / sarath
#define is the macro,const is modifier forexample const is
used in theb program we can not modify the data
| Is This Answer Correct ? | 10 Yes | 1 No |
Answer / sirin
#define MAX 100 - create constant with no type information
const int max = 100 - with type information
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / chitransha seth
with # define u can always undefine the variable by using
# undef but a const once defined cannot be altered
| Is This Answer Correct ? | 3 Yes | 2 No |
What does no cap mean?
#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
What is class and example?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
Whats oop mean?
which structured data type is not used in c++? 1.union 2.structure 3.string 4.boolean
What is polymorphism and types?
Describe what an Interface is and how it?s different from a Class.
What are the different forms of polymorphism??
Is this job good for future? can do this job post grduate student?
write knight tour problem which is present in datastructure
what is mean by design pattern