Related Posts:
Write a C program to multiply two matricesAre you sure you know this? A lot of people think they already know this, but guess what? So take a good look at this C program. Its asked in most of … Read More
Solve the Rat In A Maze problem using backtrackingcheese.This problem can be attacked as follows.• Have a m*m matrix which represents the maze.• For the sake of simplifying the implementation, have a … Read More
C program for calculating the factorial of a numberHere is a recursive C programfact(int n){int fact;if(n==1)62return(1);elsefact = n * fact(n-1);return(fact);}Please note that there is no error handli… Read More
Write a C program to calculate pow(x,n)?There are again different methods to do this in CBrute force C programint pow(int x, int y){if(y == 1) return x ;return x * pow(x, y-1) ;}Divide and C… Read More
How would you find the size of structure without using sizeof()?Try using pointersstruct MyStruct{int i;int j;};int main(){struct MyStruct *p=0;int size = ((char*)(p+1))-((char*)p);printf("\nSIZE : [%d]\nSIZE : [%d… Read More
0 comments:
Post a Comment