Descrizione:
The C programming language. (Moderated)
|
|
|
Confused about fscanf( "%i" ) for > INT_MAX
|
| |
Sometimes C, a language I know, use, and like for many years now, still manages to confuse me. Consider: #include <stdio.h> #include <limits.h> #include <string.h> #include <assert.h> int main() { FILE * file = fopen( "tmpfile", "wb+" ); fprintf( file, "%#x\n", INT_MAX + 1 );... altro »
|
|
newbie question on writing the main() function
|
| |
If i write main like the following ways. Which one will compile and why? 1. char * main(); 2. char * main(int, char); 3. char * main(char); I guess only first will(but, all will flag a warning from the compiler) because the main() function in C needs argument names(not just argument types int or char) and cannot take a single argument(it... altro »
|
|
Passing, Pointer to Array
|
| |
Can someone please explain the following. I am completely baffled. ...void foo(char (*ele)[3]) { if (!memcmp(ele, "FOO", 3)) { printf("ele Matches FOO\n"); //Prints This } if (!memcmp(*ele, "FOO", 3)) { printf("*ele Matches FOO\n"); //Prints This TOO } ...int main()... altro »
|
|
calculating process/executable size
|
| |
Hello, I am trying to calculate memory statistics for my application that I can access at run time. All of the dynamic allocations are tracked through an allocator, so to get the full picture I want to know how much memory the executable/ process is taking up. What are the ways to do that? I am using both Visual Studio and GCC on Win32, so perhaps there are... altro »
|
|
reading in lines from a file that contain large (and unknown)
|
| |
...Message-ID: <clcm-20100204-0...@plethora.n et> ...I believe this doesn't hold for the first case ("range error"). Considering the string "9...9" containing the decimal representation of an integer that cannot be represented on a given platform as a long int, - the initial sequence is empty, - the subject sequence is the full string (excluding the terminating '\0'... altro »
|
|
can I adjust the length of a dynamic array ?
|
| |
Hi all, Assume that I already create a dynamic array Buff1 (using malloc) with length L1. Then, I want to change the length of Buff1 from L1 to L2. Can I change it or will I have to create another dynamic array Buff2 with length L2 and copy all elements of the first array Buff1 to the new array Buff2?... altro »
|
|
qsort variable length array of variable length strings
|
| |
Hi I am trying to use qsort to a dynamically allocated array of strings. It has two problems: 1) it doesn't sort 2) it gives garbage when using long data if I use ./prog1 red blue green warray = red warray = blue warray = green ./prog1 red blue green dddddddddddddddddddddddddddddd d warray = (null) warray = (null)... altro »
|
|
free c text book advice..
|
| |
hi experts I want to know which c text book is free. i've no money to buy... and library has only c++ text books. so any link to free c beginning text book is needed. i'm not programmed before, but only basic. thanks.
|
|
|