C printf not working on ubuntu 13.10 terminal
        Posted  
        
            by 
                Blaze Tama
            
        on Ask Ubuntu
        
        See other posts from Ask Ubuntu
        
            or by Blaze Tama
        
        
        
        Published on 2013-11-04T10:01:33Z
        Indexed on 
            2013/11/04
            10:18 UTC
        
        
        Read the original article
        Hit count: 397
        
First, im new in ubuntu so please bear with me.
I need to create a C based program for a course in my university. I was using opensuse and its konsole when i was in the university's lab.
So basically i need to install opensuse on my system or using a vmware. But i feel lazy to do that, so i tried to run it on my ubuntu instead of opensuse.
However, no C code seems working on ubuntu's terminal. The compiling is success, but its not running, or at least the printf is not running.
This is my code, a very very simple one :
#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
int main()
{
    printf("test");
    return 0;
}
When i compile it with gcc test.c -o test everything work fine and i get an executeable file.
Then i try to run it by ./test, but the printf is not printed. No error or warning was shown.
Am i missing something?
Note : my gcc is the new one, it should has no problem.
Thanks for your help :D
© Ask Ubuntu or respective owner