void main()
{
unsigned giveit=-1;
int gotit;
printf("%u ",++giveit);
printf("%u \n",gotit=--giveit);
}
How to return multiple values from a function?
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
main() { extern int i; i=20; printf("%d",sizeof(i)); }
how to concatenate the two strings
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
What are segment and offset addresses?
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?