this code doesn't print any thing with gcc ??

This is a discussion on this code doesn't print any thing with gcc ?? within the C Programming forums, part of the General Programming Boards category; Code: #include <stdio.h> main(){ int a = 0; printf("a %d b",a); printf("a %x b",&a); while(1){ } }...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Location
    Hyderabad, India
    Posts
    33

    this code doesn't print any thing with gcc ??

    Code:
    #include <stdio.h>
    main(){
        
        int a = 0;
        printf("a %d b",a);
        printf("a %x b",&a);
        while(1){
    	
        }
    }

  2. #2
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65
    add fflush(stdout); after the second printf(). And well, I hope an endless loop does make sense to.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. merging linked lists
    By scwizzo in forum C++ Programming
    Replies: 15
    Last Post: 09-14-2008, 06:07 PM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 04:00 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Game Programming
    Replies: 0
    Last Post: 10-14-2002, 02:27 PM
  4. << !! Posting Code? Read this First !! >>
    By kermi3 in forum C# Programming
    Replies: 0
    Last Post: 10-14-2002, 02:26 PM
  5. << !! Posting Code? Read this First !! >>
    By kermi3 in forum C Programming
    Replies: 0
    Last Post: 10-03-2002, 04:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21