Tuesday 8 August 2017

Primitive Data Types in C++

Data type is a core concept in programming languages. Computer accepts the input, process it and return us output. The question is that what types of data is accepted by computer. Data type defines the set of values and set of operation on those values. For example in integer data the values will be whole number mean the numbers without decimal points and fraction. Addition, subtraction, multiplication division and can cab performed on integer values. On the other hand if we have character data then the values are alphabet, digit and special symbols having length one within single quotation marks and concatenations types of operations can be perform on these.
There are two types of data a type in c++ language first is primitive and second is user defined. In this lecture only primitive data types will be discussed and user defined will be discussed later.


The description of primitive data types are as following

For more detail visit following video link in Urdu

Thursday 3 August 2017

First Program in C++

Line 1: #include is preprocessor directive it an instruction to preprocessor to add header file in the program. Preprocessor is a part of compiler that is why it is some time called compiler directive. Preprocessor modify the code before compilation.
Line 3: Namespace is a collection of classes, objects and variables. Namespaces are used to resolve the naming collisions. In upcoming videos it will be discussed a lot.
Line 5: Main function is defined, It is a place where the execution of C program start. int is return type of main function and main take no parameter that is why empty parenthesis are used.

Line 6-9: called program body. There are two instruction in body of main first is cout and second return. cout is output object which output on the screen console. Program return 0 if it execute successfully.

Syntax of Programming Languages

If we want to write English paragraph then some rules have to follow, these set of rules are called grammar. In the same way programmer has to follow set of programming rules called syntax. Suppose in following instruction is written according to rules
cout<<”Rao Israr”;
But when these rules are violated like
cout<<’Rao Israr’;

Called syntax error, because single quotation marks are used except double.

Language Translator/ Language Processor


As we know that computer cannot understand high level language directly. We have to translate high level language into machine readable form. Source code is input for language translator and machine readable form is output of it. Three types of translators are used for this purpose
Compiler
Interpreter
Assembler
Compiler takes source code and converts it into object code (Machine Readable form) as a whole.
Interpreter takes one instruction at a time and converts it into machine code

Assembler takes assembly code and converts it into object code.


Source Code VS Object Code

Program written into high level languages is called source code is called source code. Source code is not executed by computer directly because computer works on binary numbers. So source code has to convert into form that computer can understand it. There is need a translator to convert high level language to machine readable form. Input of translator is source code and output is machine readable code which is called object code.






Extension of high level language is depending on programming language like in C++ extension is .cpp and .obj for object code.

Wednesday 2 August 2017

Programming Languages

As we have discussed in previous video that computer is instructed through instructions to perform some specific task, now question is that how can we provide these instructions to computer? We cannot say that “please computer open game software because I want to play it”. As human use language to communicate with each other in the same way computer programming is used to communicate with computer in simple words we can say computer language is a means of communication between human and computer.

For further detail visit: https://www.youtube.com/watch?v=qbwQ8OePxMc

What is Program?

A well-defined set of instructions that tell the computer what to do and how to do is called computer program. If we instruct the human to do something is am instruction and if we give set of instructions to perform some task is called program. Computer do exactly as instructed through instruction provided to it. Without program computer is just a box like a human without soul.

For further detail visit: computer science in urdu

Tuesday 1 August 2017

Data Types in C++ Urdu

Data Types in C++ Urdu
 There are two data types in C++ one is primitive data also called built in data types and second is user defined data types. primitive data types are discussed in this video and user defined data types will be discussed later.
for further detail visit: https://www.youtube.com/watch?v=CuiGQK2MzAU

How Computer Work Like Human in Urdu


Computer and Human

Human have number of organs which take the data from its environment and send it to his mind. Mind process it and respond it according to his/her understanding. Computer works like human, it has lot of input and output devices which take the data from its environment and send to its mind(CPU), which process it according to the instructions and return us output.
To complete guidance please visit the link https://www.youtube.com/watch?v=OgCCoXl1CGc