Friday, September 3, 2010

Turbo C Programming Day 1a: Basic input, output and variables

Hi all. So this will be the start of a series of tutorials as a crash course for Turbo C Programming. 
As students probably know, Turbo C is one of the first programming languages taught at college.

It's interface looks primitive compared to modern IDEs such as Visual Studio, but still, Turbo C can be a powerful programming language, and a fundamental knowledge on computer programming in general begins here.



Assuming you already have Turbo C installed, let's continue. First, as shown in screenshot above, we need to set first the directories so the compiler knows where to find the files it needs.

Assuming you install your Turbo C in "C:\TC", so your directories settings should be same as above. Never forget this, as this is a common issue many newbies encounter.



Now let's begin coding. Shown above is a code listing for a very simple program for basic output, printing to screen the words "Hello World".
#include   <= this one tells the compiler to include the code listing found in the file stdio.h, which in general contains basic routines for standard input and output functions, and this includes the statement "printf".

main()  <= like in every programming language, every program must have a "main()" routine or function, which is the starting or entry point of the program. Notice that every function must be enclosed in { and }.

printf("Hello World");   <= notice that every line of code, except for comments, within a function must be ended by semicolon(;).

The statement "printf" is an example of a method, a routine that accepts a parameter in between its parentheses and does an action about it. In this case, the parameter is "Hello World", and the action is printing it on screen.

getch();  <= is simply a method or command to tell the system to wait for user keyboard input before terminating. Without this, we wouldn't be able to see "Hello World" outputted to screen as the program is immediately terminated after printing in split second.


To actually make the program run, after saving(Shortcut F2), we must compile it first by choosing the option above.


After compilation, we run the program by choosing the menu option above.


And here is our first output, hooray! We are now able to print words, sentences, or even paragraphs onto a computer screen!

P.S: Printing "Hello World" to output stream is already a programming tradition when it is your first time trying out a programming language.

If you have questions, please feel free to ask, or leave a comment. Thanks! Stay tuned!

4 comments:

  1. How can I attach a javascript on a jpeg document in turbo ..?? can you also tell me the script which can enable me to get into other computers my friend is doing it but not telling me.. shafay1996@yahoo.com

    ReplyDelete
  2. how can i download this? answer me please

    ReplyDelete
  3. This tutorial on Turbo C programming and basic input is helpful for beginners who want to understand fundamental programming concepts. I appreciate how introductory lessons make learning coding easier and more accessible. Understanding basic input and programming logic provides a strong foundation for developing technical skills. Similarly, professional software development services help businesses create reliable and innovative digital solutions. Many mobile app development companies in bangalore focus on building practical and user-friendly applications. A skilled user experience agency can improve the usability of digital products. Choosing a trusted website development company india can help businesses build a strong online presence. A wordpress web design company in bangalore can create attractive and responsive websites. Likewise, website development services in mumbai support businesses in expanding their digital reach. Thank you for sharing this useful programming tutorial for learners!

    software development services

    mobile app development companies in bangalore

    user experience agency

    website development company india

    wordpress web design company in bangalore

    website development services in mumbai

    ReplyDelete
  4. This Turbo C programming tutorial is a helpful resource for beginners learning basic input concepts and programming fundamentals. I appreciate how tutorials like this make technical subjects easier for students to explore. Thank you for sharing this educational content with your readers. In healthcare, digital technology also plays an important role in improving operational efficiency. An HMS Hospital Management System can help hospitals organize daily activities and patient records. Modern clinic management software can simplify appointment scheduling and administrative tasks. Reliable Hospital Management Software supports better coordination across hospital departments. A Laboratory Information Management System helps laboratories manage samples and test results efficiently. Revenue Cycle Management Software can support billing and claims processing. Home Health Care Software helps coordinate care outside traditional hospital settings. The Best Hospital Management Software in India for 2026 Guide can help healthcare providers explore suitable technology options. A connected Healthcare Platform can improve information sharing among medical teams. The ABDM M3 & NHCX Integration Guide: How Indian Hospitals Can Speed Up TPA Claim Settlements highlights the value of digital healthcare integration. Hospital Management Software That Connects Every Decision emphasizes connected information for better planning. Keep sharing valuable tutorials and informative content that helps readers learn and grow!



    HMS Hospital Management System

    clinic management software

    Hospital Management Software

    Laboratory Information Management System

    Revenue Cycle Management Software

    Home Health Care Software

    Best Hospital Management Software in India for 2026 Guide

    Healthcare Platform

    ABDM M3 & NHCX Integration Guide: How Indian Hospitals Can Speed Up TPA Claim Settlements

    Hospital Management Software That Connects Every Decision

    ReplyDelete