Search:

Type: Posts; User: barim

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: 255

    by barim
    Replies
    1
    Views
    991

    255

    Maybe this question is not related to C language at all, maybe is. I wonder why in excel number of columns is 255 and maximum number of characters for naming file is 255. Is there any connection?
    ...
  2. Thread: array of ints

    by barim
    Replies
    4
    Views
    2,113

    array of ints

    I have these codes:




    #include <stdio.h>
    #include <stdlib.h>
    #include <conio.h>
    int main()
    {
  3. Thread: read line

    by barim
    Replies
    12
    Views
    1,700

    I don't understand why you use sizeof as...

    I don't understand why you use sizeof as argument, and why in this line if (i < (n - 1)) you need n-1?

    Thanks.
  4. Thread: read line

    by barim
    Replies
    12
    Views
    1,700

    Thanks guys for your help. I compiled program...

    Thanks guys for your help.

    I compiled program that andyhunter helped me with, and it functions good. It counts characters. I am confused with variable n. Do I really need it? str represents array...
  5. Thread: read line

    by barim
    Replies
    12
    Views
    1,700

    read line

    I am trying to read characters and count its numbers. First, my compiler prompted me for the size of the array. I added number 50, why do I have to specify size in this case?
    I have an erro...
  6. Thread: fputs

    by barim
    Replies
    6
    Views
    2,818

    fputs

    I understand that fgets is the best for user input, comparing with scanf and gets. What is going on with the output? Is puts safe to use, and how much data this function can handle? If you use fputs...
  7. Replies
    5
    Views
    1,698

    Why strcmp equals zero

    I followed Hammer's tutorial on Comparing Strings, but one thing I don't understand.




    if(strcmp(foo, bar) == 0)
    puts("Strings equal");
    else
    puts("Strings not equal");
  8. Replies
    3
    Views
    1,346

    main() with arguments?

    Hello!

    I am taking steps now to learn C thoroughly since you encouraged me to do so. Thanks. Now I have some questions for you. I see in most of the programs that main has no any arguments or...
  9. Replies
    6
    Views
    5,714

    Thanks for your optimism. This was the question...

    Thanks for your optimism. This was the question that was maybe unnecessary. So, you can be C programmer, have a job, make the applications. That's great, I am going to start learning this language...
  10. Replies
    6
    Views
    5,714

    Future of C programming

    Hello!

    I am struggling to understand this language and start to be creative. My question is what is the future of C language? Where this language is used and is this language worth of effort? I...
  11. Thread: Shopping program

    by barim
    Replies
    10
    Views
    9,586

    Thanks, quzah this error is fixed, I have display...

    Thanks, quzah this error is fixed, I have display of the first question. That is OK but I would like after response to first question the other question that follows to be displayed. My loop is not...
  12. Thread: Shopping program

    by barim
    Replies
    10
    Views
    9,586

    I've got this code: #include ...

    I've got this code:




    #include <stdio.h>
    #include <stdlib.h>
    #define MAX_NUM 50
    typedef struct{
    char desc[15];
  13. Thread: Shopping program

    by barim
    Replies
    10
    Views
    9,586

    Shopping program

    Hello!

    I would like to make me a program about shopping expences. The best idea in C is to use structures for that. Correct me if I am wrong.

    I did this little code here:



    #include...
  14. Replies
    10
    Views
    1,379

    I think that problem should be in this line: ...

    I think that problem should be in this line:



    while((len=getline(s, MAXLINE))>0)



    There is call to function getline along with its parameters, this function is not declared. You should...
  15. Thread: prime number.

    by barim
    Replies
    13
    Views
    7,085

    I just want to point on this part of codes...

    I just want to point on this part of codes written by kinghajj char continue = 'y';

    continue is reserved keyword, so is it allowed for naming variables? I know so far that it is not allowed....
  16. Replies
    2
    Views
    1,090

    What comes after else?

    Hello!

    This is the code:




    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
  17. Thread: if statement

    by barim
    Replies
    1
    Views
    1,032

    if statement

    I have this piece of code:




    if(!feof (fp))
    {
    insert(&startPtr, item.part, recoff);
    recoff = ftell(fp);
    fread(&item, sizeof(struct invent), 1, fp);
  18. Thread: Simple question

    by barim
    Replies
    3
    Views
    844

    Thanks Kip this was wonderful explanation. I...

    Thanks Kip this was wonderful explanation.

    I have another code:




    newPtr = (LISTNODEPTR) malloc (sizeof(LISTNODE));
  19. Thread: Simple question

    by barim
    Replies
    3
    Views
    844

    Simple question

    I have this code:




    void insert(LISTNODEPTR *, char *, long );
    void delete (LISTNODEPTR *, char *);
    int isEmpty(LISTNODEPTR);
    void printList (LISTNODEPTR);
  20. Replies
    10
    Views
    5,305

    Thanks quzah! I have another error message. I...

    Thanks quzah!

    I have another error message. I assume it is something about the brackets. This is whole complete code again.




    #include <stdio.h>
    #include <conio.h>
    #include <stdlib.h>
  21. Replies
    2
    Views
    1,244

    structure tag required?

    Hello!

    Can somebody tell me is name tag for structures required? I tried to find the answer in my C book but i found nothing.

    Thanks.
  22. Replies
    10
    Views
    5,305

    Hi quzah! I forgot to tell you how I fixed...

    Hi quzah!

    I forgot to tell you how I fixed this problem. I put tag name inside and I think it works fine now. My compiler doesn't point at that spot anymore.

    This is what I did:



    ...
  23. Replies
    10
    Views
    5,305

    I have another error message on line 27 ...

    I have another error message on line 27
    [Warning] multi-line string literals are deprecated.
    I counted the lines and it points at the line between following codes:




    char ch, lastch = ' ';...
  24. Replies
    10
    Views
    5,305

    I tried to execute this. My compiler doesn't like...

    I tried to execute this. My compiler doesn't like it.




    #include "stdafx.h"
    #include <stdio.h>
    #include <conio.h>
    #include <stdlib.h>
    #include <string.h>
  25. I just want to add something to tommy's program:...

    I just want to add something to tommy's program:




    case 8:
    exit(1);
    break;
Results 1 to 25 of 26
Page 1 of 2 1 2