Search:

Type: Posts; User: chibi.coder

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. bump.

    bump.
  2. I did try "rb" mode in fopen function and the...

    I did try "rb" mode in fopen function and the results were same(forgot to mention it in earlier posts).
  3. inputFile=fopen(fileName,"r"); ...

    inputFile=fopen(fileName,"r");
    fseek(inputFile,0,2);
    sizeofFile=ftell(inputFile);
    perror("ftell():"); sizeofFile++;


    It is giving a 'perror' message as
  4. Acutal size of the is 117406C But ftell in the...

    Acutal size of the is 117406C
    But ftell in the copy_file_to_buf function showing it as 114689.


    fread_ret:0
    ferror_ret:0


    No.
  5. Problem while copying the contents of file to a buffer.

    I'm trying a implement program which will do a job, same as that of
    CPP (The C preprocessor) when I compile a .c file.

    Here in this particular code the Copy_file_to_buf fucntion not copying the...
  6. Replies
    1
    Views
    1,086

    Help needed with fork operation

    #include<stdio.h>
    #include<stdlib.h>
    main(void)
    {
    if(fork())
    {//parent process
    printf("Parent process\n");
    printf("par:%d\n",getpid());
    }
    else
  7. Replies
    7
    Views
    1,451

    char string1[255] = "Hello World"; In the above...

    char string1[255] = "Hello World";
    In the above initialization the size of array is 255 bytes.
    Where as for

    char string1[]="Hello World";
    the size of the string1 array is just 12 bytes of...
  8. Replies
    3
    Views
    776

    Help needed in recursion.

    #include<stdio.h>
    void print(char *p)
    {
    if(*p)
    print(++p);
    printf("%s\n",p);
    }
    main()
    {
    char *p="ABCD";
  9. My impatience made me to post this thread :/....

    My impatience made me to post this thread :/. Sorry to bother you guys.
    I'll definitely gonna reveal it. I may learn new things while revealing it. :)
  10. ^ A friend of mine has given this program and...

    ^ A friend of mine has given this program and asked me for output of it without compiling on compiler. I tried but couldnt sunderstand it properly.
  11. Can someone explain the logic of the program

    main()
    {
    int a,b,c;
    int count = 1;
    for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\
    TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
    UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
    NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\...
  12. Replies
    5
    Views
    813

    Read the errors before you ask for help. The...

    Read the errors before you ask for help. The answer is in your post itself. :)
  13. Replies
    14
    Views
    1,662

    Use fwrite() and fread() instead of fprintf and...

    Use fwrite() and fread() instead of fprintf and fscanf() respectively.
  14. Replies
    5
    Views
    6,863

    I actually meant auto type variables (variables...

    I actually meant auto type variables (variables store values automatically) .Thanks for explanation though.
  15. Replies
    5
    Views
    6,863

    Automatic variables default intial value

    Why the default initial value of automatic variables are garbage values? Why not 0 like static and global variables initial value?
  16. Replies
    4
    Views
    13,759

    use either (void) fseek(stream, 0, SEEK_SET) ...

    use either

    (void) fseek(stream, 0, SEEK_SET)

    or

    rewind(fp);

    The above two functions will point to the initial position of a FILE. By incrementing current pointer you can read the file...
  17. Thread: EOF

    by chibi.coder
    Replies
    79
    Views
    11,169

    The concept EOF can be seen only in file streams...

    The concept EOF can be seen only in file streams (the opened files). EOF is a macro with -1 value.
  18. Replies
    15
    Views
    5,293

    You must implement your own printf function...

    You must implement your own printf function (myPrintf( )). And in that you need to write a function such that if "%n" found -do something.

    user-defined printf function can be written with the...
  19. Help with the size of the object files and extended source file

    #include<stdio.h>
    main()
    {
    }


    commands used
  20. Replies
    8
    Views
    1,584

    Use strcmp() for comparing strings. You are...

    Use strcmp() for comparing strings.
    You are comparing addresses of the strings instead of strings.
  21. Replies
    8
    Views
    1,444

    Create an object code. :P

    Create an object code. :P
  22. Replies
    5
    Views
    880

    Use 2-D array ( Array of 1-D arrays) ...

    Use 2-D array ( Array of 1-D arrays)

    string[][20];//
  23. Thread: if

    by chibi.coder
    Replies
    6
    Views
    830

    if(condition) is a conditional statement. If...

    if(condition)
    is a conditional statement. If the condition results in logical 0 then the body of the loop won't be excuted whereas if the condition is logial 1 then the body of the loop will be...
  24. Replies
    4
    Views
    2,842

    when you intialize a string constant to char...

    when you intialize a string constant to char pointer, the stringconstant is stored in a text or code (Which is read-only file).


    char *string="monkey";
    So, redefine to a char array

    char...
  25. Replies
    10
    Views
    1,176

    Dude, you won't get any output even if you change...

    Dude, you won't get any output even if you change d=-1 to d=0.
Results 1 to 25 of 32
Page 1 of 2 1 2