FREE EBOOKS
Wednesday, January 28, 2015
Sunday, January 4, 2015
3 Data types
Introduction to Data types
A Data type is nothing but types of data.For example int,char,float,double etc..A variable declared with specific data type(int=a;or float =a;).The type of variable decide how much space is occupied in memory.
All data type is derived by following categories:-
1.Primitive data type or Fundamental Data type.
2.Derived data type.
3.User defined data type.
Sunday, December 21, 2014
How many error occurs in C language ?
There are three types of errors that may occur while developing or writing C program. There errors are:
1.Syntax Errors
2.Logical Errors
3. Runtime Errors
2.Logical Errors
3. Runtime Errors
Syntax Errors:-
The set of rules (grammatical rules) of a programming language for writing statements of the computer program is known as syntax of the language. The program statements are written strictly according to these rules.
Syntax error occur when syntax of a programming language are not followed in writing the source code. The compiler detects these errors at compiling time of source code. The compiler reports a proper error message about the error.
Sunday, December 14, 2014
Why Programmer/Developer need to know about dangiling pointer and memory leak?
Answer:
Pointer helps to create user defined scope to a variable, which is called Dynamic variable. Dynamic Variable can be single variable or group of variable of same type (array) or group of variable of different types (struct). Default local variable scope starts when control enters into a function and ends when control comes out of that function. Default global vairable scope starts at program execution and ends once program finishes.
But scope of a dynamic variable which holds by a pointer can start and end at any point in a program execution, which has to be decided by a programmer. Dangling and memory leak comes into picture only if a programmer doesnt handle the end of scope.
Subscribe to:
Comments (Atom)