Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
40% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
2
Posts with Downvotes
1
Downvoting Members
2
2 Commented Posts
~1K People Reached
Favorite Forums
Favorite Tags

7 Posted Topics

Member Avatar for srisrisri

Maybe what you want is this: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int i,j; char *str="Good, Morning!"; int len=strlen(str); char *Rstr=(char *)malloc(len+1); for(j=0,i=len-1;j<len;j++,i--) Rstr[j]=str[i]; Rstr[j]='\0'; printf("Original string:%s\n",str); printf("Reversed string:%s\n",Rstr); free(Rstr); return 0; } [/CODE]

Member Avatar for minhajakhter
0
316
Member Avatar for greenman78

By changing the code to this:[CODE] C[i][j] += A[i][k] * B[k][j]; [/CODE] you can reduce accessing memory( or register) by ONE time.

Member Avatar for stokes1900
0
113
Member Avatar for y9john

[QUOTE=y9john;1374284]Hi guys, I am working on a program for my c class and I was wondering anyone knows if it is possible to define a structure that has dynamic members. I think I saw a thread on this already but when I read it, it didn't quite make sense. This …

Member Avatar for y9john
0
116
Member Avatar for ybsolar

I want to create a double pointer and make it point to an double dimension array, then output the content of the array through the pointer. However Gcc warn me that "assignment from incompatible pointer type". Just like this: [CODE]#include <stdio.h> #include <stdlib.h> int main() { int i,j; int **p; …

Member Avatar for gerard4143
0
135
Member Avatar for Shift-Stop

[QUOTE=Shift-Stop;1369064][code=c] // ----------------------------------------------- int mySquare(int y1) // rcv'ing dbl = 4 { double x1=1 ;// valid, but impossible to reach. printf("\n SQRD incoming Y1: %d",y1); // shows 4 printf("\n SQRD return y1*y1: %d",y1*y1); //shows 16 x1 = (int)(y1*y1); // ??? printf("\n SQRD return X1: %d",x1); //shows 0 ! return x1; …

Member Avatar for Shift-Stop
0
86
Member Avatar for kangkan_14

This's my implementary of merge sorting. [CODE]#include<stdio.h> #define N (11) // size of sorting array void msort(int a[],int low,int high); void merge(int a[],int low,int high,int mid); int main() { int low=0,high=N-1,count; int a[N]={0,9,7,8,6,0,2,1,5,4,3}; // original data printf("Before sorting: "); for(count=0;count<N;count++) printf("%d " ,a[count]); putchar('\n'); msort(a,low,high); printf("After sorting: "); for(count=0;count<N;count++) printf("%d …

Member Avatar for N1GHTS
0
177
Member Avatar for xaop
Member Avatar for xaop
0
91

The End.