C Language - BIL104E INTRODUCTION TO SCIENTIFIC AND...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: BIL104E INTRODUCTION TO SCIENTIFIC AND ENGINEERING COMPUTING (C) WEEK - 1 Accessing From LINUX machine at command prompt write : ssh username@hyperion.labs.itu.edu.tr By using Putty/ssh secure shell username@hyperion.labs.itu.edu.tr After this step when asked write your password Basic LINUX commands ls : list directory contents mkdir : make directories cd : Change the current directory to /home, cd .. : Change the current directory to upper directory rm : remove files or directories rmdir : remove empty directories pwd : print name of current/working directory cp : copy files and directories mv : move files VI/VIM - 1 On a UNIX-based machine, a text editor such as vi/vim to write C programs should be known ( http://www.vim.org/ ) Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems VI/VIM - 2 vim filename : Opening a file named as filename by vim (In C programs vim filename.c ) i or insert : to edit the file esc : escaping from editing mode :q! : quiting the file without saving the changes :wq : quiting the file with saving the changes dd : deleting the line ( Ex: 6dd deletes the current line and the 5 lines below it ) :set number : showing the line numbers /word : searching the word ( n will jump to the next match, :nohlsearch will remove highlighting ) First C program – 1 Week1_1.c which writes Hello World on screen #include <stdio.h> main() { printf (“Hello World\n”); return 0; } First C Program – 2 Compiling Week1_1.c with gcc gcc – o Week1_1.x Week1_1.c Running executable file ./Week1_1.x #include...
View Full Document

This note was uploaded on 11/22/2010 for the course BIL 104 taught by Professor Abc during the Fall '09 term at Istanbul Technical University.

Page1 / 23

C Language - BIL104E INTRODUCTION TO SCIENTIFIC AND...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online