Write a macro for swapping integers
Answers were Sorted based on User's Feedback
Answer / deepak
# define swap(a,b) a = a + b; b = a - b; a = a - b;
| Is This Answer Correct ? | 50 Yes | 8 No |
What is extreme programming?
#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 the size of an empty class
Name an advantage of array over linked list?
24 Answers GML, IBM, Software Solutions,
What is this pointer in oop?
Why a "operator=(...)" when there is a copy ctor?
Can we have a private virtual method ?
What is cohesion in oop?
can we make a class static without using static keyword?
what is the diffrence between c# and c++
I am developing a payroll system mini project.I used file concept in program for reading and writing.When the program is reloading into the memory that is if i execute next time the file was cleaned and adding data from the starting this is my problem.I want to strore the previous data and if i want to add any record that should be next of previous data.Please help me.
What is a class?
32 Answers Infosys, TCS, Thylak,