Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th March 2007, 12:45
full_adder full_adder is offline
Junior Member
 
Join Date: Feb 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Where is the output ofter the compilation?

Hi

I have written a samle C program, named T1.c :
#include<stdio.h>
int main(){
printf("Hello...");
return 0;
}

and Isaved it in a special directory named Testing in / Desktop/Testing.
then I comiled with:

[root@localhost Testing]# cc T1.c
[root@localhost Testing]# ls
a.out T1.c

Now, how can I see the output, which is : Hello...

thanks
Reply With Quote
Sponsored Links
  #2  
Old 11th March 2007, 13:03
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

cc default output is a.out. So you need to execute a.out. You'd have to do two commands
Code:
chmod +x a.out
./a.out
, but I'm not 100% sure the 1st one is needed. It's used to give execute permissions to a file. You can check if they already exists with
Code:
ls -l a.out
If you see 'x' in the beginning of the line, it's already oke.
Reply With Quote
  #3  
Old 11th March 2007, 17:12
full_adder full_adder is offline
Junior Member
 
Join Date: Feb 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Many thanks for your help.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors during ISP compilation gimi Installation/Configuration 4 18th July 2006 16:23
Firewall script ColdDoT Server Operation 1 8th May 2006 23:50
Upgrade from 2.2.0 to 2.2.1 successful but SSL and IMAP stopped working teleriddler Installation/Configuration 8 29th April 2006 14:25
SuseFirewall expert pls help zacch Installation/Configuration 11 17th March 2006 04:24
HTTPD and Clamav Compilation Tribal-Dolphin Developers' Forum 2 29th August 2005 07:26


All times are GMT +2. The time now is 06:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.