Puzzles, Tips, Tricks, Tweaks and Hacks

Owner: lakshmikandhbe

Listed in: Academics

Language: English

Tags: pointers, advanced c, structures, puzzles, tips

Report it

Site Statistics

Unique Visitors Today:
Page Views Today:
Unique Visitors this Week:
Page Views this Week:
Unique Visitors this Month:
Page Views this Month:
Total Unique Visitors:
Total Page Views:
Total Hits Out:
Traffic Chart

Latest Blog Posts for c programming

  • Frequently Asked Questions + Variable-Length Argument Lists
    on Nov 30, 2009 in faqs
    15.1 I heard that you have to #include before calling printf. Why? 15.2 How can %f be used for both float and double arguments in printf? Aren't they different types? 15.3 I had a frustrating problem which turned out to be caused by the line printf(...
  • Frequently Asked Questions + Floating Point
    on Nov 30, 2009 in faqs
    14.1 When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999? 14.2 I'm trying to take some square roots, and I've simplified the code down to main() { printf("%f\n", sqrt(144.)); }but I'm still getting crazy numbers. 14.3 I'...
  • Frequently Asked Questions + Tools and Resources
    on Nov 30, 2009 in faqs
    [NOTE: Much of the information in this section is fairly old and may be out-of-date, especially the URLs of various allegedly publicly-available packages. Caveat lector.] 18.1 I need some C development tools. 18.2 How can I track down these pesky mal...
  • Frequently Asked Questions + Strange Problems
    on Nov 30, 2009 in faqs
    16.1 Why is this loop always executing once? for(i = start; i < end; i++); { printf("%d\n", i); }16.1b I'm getting baffling syntax errors which make no sense at all, and it seems like large chunks of my program aren't being compiled. 16.1c Why...
  • Frequently Asked Questions + System Dependencies
    on Nov 30, 2009 in faqs
    19.1 How can I read a single character from the keyboard without waiting for the RETURN key? How can I stop characters from being echoed on the screen as they're typed? 19.2 How can I find out if there are characters available for reading (and if so...
  • Frequently Asked Questions + Miscellaneous
    on Nov 30, 2009 in faqs
    20.1 How can I return multiple values from a function? 20.2 What's a good data structure to use for storing lines of text? I started to use fixed-size arrays of arrays of char, but they're just too restrictive. 20.3 How can I open files mentioned on...
  • Frequently Asked Questions + Library Functions
    on Nov 30, 2009 in faqs
    13.1 How can I convert numbers to strings (the opposite of atoi)? Is there an itoa function? 13.2 Why does strncpy not always place a '\0' terminator in the destination string? 13.3 Does C have anything like the ``substr'' (extract substring) rout...
  • Frequently Asked Questions + Style
    on Nov 30, 2009 in faqs
    17.1 What's the best style for code layout in C? 17.2 How should functions be apportioned among source files? 17.3 Here's a neat trick for checking whether two strings are equal: if(!strcmp(s1, s2))Is this good style? 17.4 Why do some people write...
  • Frequently Asked Questions + Memory Allocation
    on Nov 29, 2009 in faqs
    7.1 Why doesn't this fragment work? char *answer; printf("Type something:\n"); gets(answer); printf("You typed \"%s\"\n", answer);7.2 I can't get strcat to work. I tried char *s1 = "Hello, "; char *s2 = "world!"; char *s3 = strcat(s1, s2);but I got s...
  • Frequently Asked Questions + ANSI/ISO Standard C
    on Nov 29, 2009 in faqs
    11.1 What is the ``ANSI C Standard?'' 11.2 How can I get a copy of the Standard? 11.2b Where can I get information about updates to the Standard? 11.3 My ANSI compiler complains about a mismatch when it sees extern int func(float); int func(x) float...
Loading Comments...


{ds_PageTotalItemCount} commentcomments

Post a Comment