www.fatihkabakci.com

Personal Website and Computer Science TUR EN

C PROGRAMLAMA DILI

Last update: 10/2/2014 11:47:00 PM

Yazan:Fatih KABAKCI

Ilk olarak Dennis Ritchie tarafindan 1969 yilinda Bell laboratuvarinda Unix uzerinde calisan bir bilgisayar uzerinde gelistirilen C,programcilik dunyasinda bir devrim niteliginde ortaya cikmistir.Bu devrimin temel sebebi dilin bir programci dili olmasidir.Ayrica dilin genel kapsamda daha karmasik programlar yazilmasina da imkan vermesidir.

Fortran,Cobol ve Assembly gibi diller sadece belirli bir alanda program gelistirmeye izin verirken,C'nin en genel duzeyde bir programlama dili olmasida bu dile olan ogrenme arzusunu da gelistirmistir.Her ne kadar Pascal dili mevcut olsa da,kod satirlari uzayan bir program icin C'nin guclu avantaji yadsinamaz duzeye gelmistir.

C programlama dili prosedurel(proses yonelimli) bir dildir.Yani program parcaciklari belirli bir ayristirma ile butun bir programin yapisal ve mantiksal temelini olusturmaktadir.Bu yazida her C programinda kullanilan temel yapi incelenecektir.
1 int main()
2 {
3 // TODO...
4 return 0;
5 }
Yukaridaki 5 satirdan olusan program her C programinda bulunan bir yapidir.Her C programi bir main fonksiyonu ile baslar ve fonksiyonun bitis blogu ile sona erer.C programlama dilinde programci tarafindan // ve /*...*/ olmak uzere 2 farkli yorum(comment) stili bulunmaktadir.Bunlar C derleyicisi tarafindan dikkate alinmayip sadece programi yazan kisiye programda anlamini unuttugu bir takim yerleri hatirlatma gorevi ustlenen yardimcilardir.

return 0 ifadesi ise isletim sistemine bu programin bulundugu bellege 0 degeri donuldugu belirtilir.Buradaki 0 degerinin bir anlami yoktur.234124 gibi rasgele bir deger de derleyici tarafindan kabul edilecektir.Ancak geleneksel olarak 0(false) ve 1(true) degerleri bir programi sona erdirmek icin kullanilmaktadir.
1 // Standart I/O kutuphanesi (printf icin)
2#include <stdio.h> 

4 int main()
5 {
6  /* 
7  Ekranda Hello world goruntulemek icin
8  */
9 printf("Hello world"); 
10 return 0;
11 }
Yukaridaki programda da,konsol ekraninda 'Hello world' ibaresi goruntulenmektedir.printf() fonksiyonu stdio.h kutuphanesinde yer alan konsol ekranina aldigi parametreyi aktaran formatlama ozelligine sahip bir fonksiyondur.Daha detayli icin C temel I/O fonksiyonlari inceleyebilirsiniz.
There has been no comment yet

Name:


Question/Comment
   Please verify the image




The Topics in Computer Science

Search this site for





 

Software & Algorithms

icon

In mathematics and computer science, an algorithm is a step-by-step procedure for calculations. Algorithms are used for calculation, data processing, and automated reasoning.

Programming Languages

icon

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. It can be used to create programs to control the behavior of a machine. Java,C, C++,C#

Database

icon

A database is an organized collection of data. The data are typically organized to model aspects of reality in a way that supports processes requiring information.

Hardware

icon

Computer hardware is the collection of physical elements that constitutes a computer system. Computer hardware refers to the physical parts or components of a computer such as the monitor, memory, cpu.

Web Technologies

icon

Web development is a broad term for the work involved in developing a web site for the Internet or an intranet. Html,Css,JavaScript,ASP.Net,PHP are one of the most popular technologies. J2EE,Servlet, JSP,JSF, ASP

Mobile Technologies

icon

Mobile application development is the process by which application software is developed for low-power handheld devices, such as personal digital assistants, enterprise digital assistants or mobile phones. J2ME

Network

icon

A computer network or data network is a telecommunications network that allows computers to exchange data. In computer networks, networked computing devices pass data to each other along data connections.

Operating Systems

icon

An operating system is software that manages computer hardware and software resources and provides common services for computer programs. The OS is an essential component of the system software in a computer system. Linux,Windows

Computer Science

icon

Computer science is the scientific and practical approach to computation and its applications.A computer scientist specializes in the theory of computation and the design of computational systems.