Search:

Type: Posts; User: antros48

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    23,247

    ok done it here it is for(int...

    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];...
  2. Replies
    4
    Views
    23,247

    sorting a 2d array by column

    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...
  3. Replies
    2
    Views
    1,208

    Stacks and Queues

    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
  4. Replies
    9
    Views
    2,511

    How can i analyze the time that needs the program...

    How can i analyze the time that needs the program to be executed? is it all about maths?
  5. Replies
    9
    Views
    2,511

    sum=0; for (i=1; i

    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++)
  6. Replies
    9
    Views
    2,511

    Running time analysis

    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++)
  7. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    Thanks again!! Study time..

    Thanks again!! Study time..
  8. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    i use gcc. And thanks a lot for your help. About...

    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!!
  9. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    Thanks a lot for your help! But will i be very...

    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???
  10. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    yes i undestand but isn't that waste of space? i...

    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?
  11. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    Another small problem came up.. int main...

    Another small problem came up..


    int main (int argc, char *argv[]){
    char t[4]="new-";
    strcat (t,argv[1]);
    printf("%s",t)
    return 0;
    }
  12. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    Thanks again!!

    Thanks again!!
  13. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    Thanks a lot guys!! But now i want to check with...

    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");...
  14. Thread: argv and argc

    by antros48
    Replies
    19
    Views
    10,502

    argv and argc

    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...
  15. Replies
    22
    Views
    2,405

    Thank u very much Subsonics!

    Thank u very much Subsonics!
  16. Replies
    22
    Views
    2,405

    Ok final question about this subject. How can i...

    Ok final question about this subject. How can i make a BMP picture come upside down ??
  17. Replies
    22
    Views
    2,405

    Well iam making a program that analyzes the...

    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...
  18. Replies
    22
    Views
    2,405

    ok so far so good now i want to specify whether a...

    ok so far so good now i want to specify whether a bmp file is compressed or not..How do i do that??
  19. Replies
    22
    Views
    2,405

    Thanks for the reply! But how about when i want...

    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??
  20. Replies
    22
    Views
    2,405

    Well so far so good.. i have build the structs...

    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?
  21. Replies
    22
    Views
    2,405

    yeap that's it!! thank you very much Subsonics

    yeap that's it!!
    thank you very much Subsonics
  22. Replies
    22
    Views
    2,405

    Yes i am aware of those two sizes. But the size...

    Yes i am aware of those two sizes. But the size of the raw bitmap data is the one i don't understand.
  23. Replies
    22
    Views
    2,405

    well iam trying to make the basic struct so i can...

    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...
  24. Replies
    22
    Views
    2,405

    image processing

    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
  25. Replies
    6
    Views
    995

    pointers on arrays

    #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);
Results 1 to 25 of 28
Page 1 of 2 1 2