Monday, May 1, 2017

Computer Programming - Summary

Computer programming is defined as telling a computer what to do through a special set of instructions which are then interpreted by the computer to perform some task(s). These instructions can be specified in one or more programming languages including Java, Python, C, and C++.

A computer goes through a set of steps whose purpose is to achieve something. These steps are instructed to the computer by computer programs. Essentialy, computer programming is the process by which these programs are designed and implemented.

Computer Programming - File I/O

Computer Files
A computer file is used to store data in digital format like plain text, image data, or any other content. Computer files can be organized inside different directories. Files are used to keep digital data, whereas directories are used to keep files.

Computer files can be considered as the digital counterpart of paper documents. While programming, you keep your source code in text files with different extensions, for example, C programming files end with the extension .c, Java programming files with .java, and Python files with .py.

Computer Programming - Functions

A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing. You have already seen various functions like printf() and main(). These are called built-in functions provided by the language itself, but we can write our own functions as well and this tutorial will teach you how to write and use those functions in C programming language.

Good thing about functions is that they are famous with several names. Different programming languages name them differently, for example, functions, methods, sub-routines, procedures, etc.

Computer Programming - Strings

During our discussion about characters, we learnt that character data type deals with a single character and you can assign any character from your keyboard to a character type variable.

Now, let's move a little bit ahead and consider a situation where we need to store more than one character in a variable. We have seen that C programming does not allow to store more than one character in a character type variable. So the following statements are invalid in C programming and produce syntax errors −

Computer Programming - Arrays

Consider a situation where we need to store five integer numbers. If we use programming's simple variable and data type concepts, then we need five variables of int data type and the program will be as follows −

#include <stdio.h>

main() {

   int  number1;
   int  number2;
   int  number3;
   int  number4;
   int  number5;
   

Computer Programming - Characters

If it was easy to work with numbers in computer programming, it would be even easier to work with characters. Characters are simple alphabets like a, b, c, d...., A, B, C, D,....., but with an exception. In computer programming, any single digit number like 0, 1, 2,....and special characters like $, %, +, -.... etc., are also treated as characters and to assign them in a character type variable, you simply need to put them inside single quotes. For example, the following statement defines a character type variable ch and we assign a value 'a' to it −

char ch = 'a';

Saturday, April 29, 2017

Shahbaz hailed for his educational programmes

LAHORE: Punjab Educational Endowment Fund (PEEF) scholars on Thursday paid rich tribute to educational programmes of Punjab Chief Minister Shahbaz Sharif in a function held at the beginning of the forth phase of laptop distribution at Aiwan-e-Iqbal, and said that due to these programmes, children belonging to poor families were also getting higher education opportunities.

Zulaikha Malik, a PEEF scholar studying at FC College Lahore, while addressing the function, said that she belonged to a poor family of Qila Gujar Singh and opened her eyes as an orphan.

TEVTA offers Financial Market Employability short course

Lahore: TEVTA in association along with MIND & MARKET is going to launch 3 months financial market employability training course in 9 institutes of Lahore.

For this purpose, interested candidates can submit their application forms till May 2nd, 2017 and the classes of this training program will begin from May 8th, 2017.