I want to convert a string (ex: 567.2.2.2) into integer or array of integer and i have to check 567 is greater then or less than 256 or not and i have to dispaly. this string is in a file
Char str[]="DOLLAR";Here , you have the base address of array i.e. str.By using only one pointer variable, you have to replace the occurrence of 'L' with '$$'. (after replacement, it should be DO$$$$AR)can any body suggest efficient method?
Latest Answer : No ,its not possible to have a dynamic array without using calloc,malloc or without ptr.... Why u want to know abt it? but u can achieve a array without specifying size say arr[]; but its not efficient as when u use this array..more space will ...
Latest Answer : void printBinary(int n){if (n>0){printBinary(n/2);printf("%c","01"[n%2]);}else{printf("n");}}int main(){int num;printf("Enter the number in decimal");scanf("%d",&num);printf("The binary equivalent ...
it is an array representation i think
Latest Answer : #include#includevoid main(){int x,y,z;clrscr();printf("enter the number");scanf("%d",&x);while(x>0){y=x%10;printf("%d",y);x=x/10;}getch();} ...
1. Given an 2D array A[M][N], we are converting it into A[N][M] along with rotating it anti clockwise. What should be the mapping,A[i][j] = A[?][?] (i,j
are 0 based indices) example:.............................................4......81...2...3...4..............................3......7.......................======>..........2......6
How to find the least two numbers in a single dimension array in a single pass (traversing the elements only once)
Latest Answer : It is very simple man. Just do like taht.#define LEAST_COMPARE(index, least) list[index] < list[least]for (index = 0;index < 10;index++){ if (LEAST_COMPARE(index,least)) { ...