ok done it here it is
for(int xcord=0;xcord<5;xcord++){
for(int ycord=xcord+1;ycord<5;ycord++){
if(a[xcord][0]>a[ycord][0]){
int temp = a[xcord][1];
int temp2=a[xcord][0];...
Type: Posts; User: antros48
ok done it here it is
for(int xcord=0;xcord<5;xcord++){
for(int ycord=xcord+1;ycord<5;ycord++){
if(a[xcord][0]>a[ycord][0]){
int temp = a[xcord][1];
int temp2=a[xcord][0];...
Hey i have a matrix containing a lot of points and each point has its coordinates x and y. That is a nx2 size array. I want to sort it according to the first column ascending, with x coordinates. For...
Hi
Iam trying to make a queue only by using one stack, but i really cannot figure out how to. I don't know if that could be done without using any temporary place in memory
Thanks
How can i analyze the time that needs the program to be executed? is it all about maths?
sum=0;
for (i=1; i<=n; i*=2)
for (j=1; j<=i; j++)
sum++;
r=0
for(i=1; i<= n ; i++)
for (j = 1; j <= n; j*=2)
if (n mod 2 == 0) // n even
for (k = 1; k <= n; k++)
sum=0;
for (i=1; i<=n; i*=2)
for (j=1; j<=i; j++)
sum++;
r=0
for(i=1; i<= n ; i++)
for (j = 1; j <= n; j*=2)
if (n mod 2 == 0) // n even
for (k = 1; k <= n; k++)
Thanks again!! Study time..
i use gcc. And thanks a lot for your help. About the name of the variable, i wish labeling of variables was my only problem in c :p. Thanks again!!
Thanks a lot for your help! But will i be very annoying if i asked you iceaway to give me a small example based on my subject???
yes i undestand but isn't that waste of space? i mean by using the k = strlen(argv[i]) and then define the size of t to be t[k] can't i use only the space appropriate?
Another small problem came up..
int main (int argc, char *argv[]){
char t[4]="new-";
strcat (t,argv[1]);
printf("%s",t)
return 0;
}
Thanks again!!
Thanks a lot guys!! But now i want to check with if -else the second argument string so i can choose what function to call.
so i did [code]
if (argv[1][] == "example")
printf ("example\n");...
nt main (int argc, char **argv[]){
int i=0;
scanf ("%s",*argv[1]);
while (argv[1][i]!='\0')
i++;
printf ("%d",i);
}
i just want to print the number of the digits of the second argument. Why...
Thank u very much Subsonics!
Ok final question about this subject. How can i make a BMP picture come upside down ??
Well iam making a program that analyzes the characteristics of bmp files. And one condition for the program to continue is that the file is not compressed. How do i recognize that? Can't i just fread...
ok so far so good now i want to specify whether a bmp file is compressed or not..How do i do that??
Thanks for the reply! But how about when i want to give the files to the program when i run the program .. can i use argv[] and set e.g. argv[1] = file??
Well so far so good.. i have build the structs for header and data now the problem is how do i read the data in binary from a bmp picture i have?
yeap that's it!!
thank you very much Subsonics
Yes i am aware of those two sizes. But the size of the raw bitmap data is the one i don't understand.
well iam trying to make the basic struct so i can build on it the rest of the program. I have read the bmp header file format but i can't really understand the difference between the file size and...
Hey everyone. Iam trying to make a program using structs and pointers on arrays to analyze a bmp picture characteristics. Any good links to study?
Thanks
#include <stdio.h>
int main(){
char *str;
char t;
int i=0, j=0;
printf("\n");
printf("Enter String (up to 50 chars): ");
scanf("%s", *str[j]);
for (j = 0; *str; ++j);