Thursday, February 06, 2014

Do U know?


What is a header file?
Header files provide the definitions and declarations for the library functions. Thus, each header file contains the library functions along with the necessary definitions and declarations. For example, stdio.h, conio.h, stdlib.h, string.h, graphics.h etc.
What is C token?
The smallest individual units of a C program are known as tokens. Different types of C Tokens are: Constants, Identifiers, Keywords, Operators, and Special symbols, Strings.
What is a string?
A string is a sequence of characters ending with NUL. It can be treated as a one–dimensional array of characters terminated by a NUL character.
Ex- char a[10]; or char b[]={‘w’,’o’,r’,’l’,’d’}; or char c[]=”world”;

What is variable?
An identifier is used to identify and store some value. If the value of the identifier is changed during the execution of the program, then the identifier is known as variable
What is a keyword?
Keywords are those words of C which have predefined meaning assigned by the C language. They form a part of the database required by the C compiler.
Ex: int, char, for, if etc. C Language 32 keywords.

What is data types?
Data types refer to the classes of data that can be manipulated by C programs. The three fundamental data types supported by C are character, integer and real type.
Using structure and class we can create user defined data types.
Ex int a; and similarly employee e;
Where a is an integer type data and e is the object / variable of the class / stucture of employee.
 What are the different types of errors?
·        Compile–Time Errors
·        Linker Errors
·        Runtime Errors
·        Logical Errors

What is meant by errors and debugging?
Errors may be made during program creation even by experienced programmers. Such type of errors are detected by the compiler.
Debugging means removing the errors.
What is meant by type casting?
There are two types of casting. i) implicit and ii) explicit.
Implicit conversation done by compiler automatically, but explicit conversation done by the user.
Ex: int a; float b=3.14; a=b; char c=(char)a;
1st example is for implicit and 2nd for explicit conversion ex.
What are the primitive data types in c?
  • There are five different kinds of data types in C.
  • Char
  • Int
  • Float
  • Double
  • Void

What is a loop?
A loop is a process to do a job repeatedly with possibly different data each time. The statements executed each time constitute the loop body, and each pass is called iteration. A condition must be present to terminate the loop.
Ex- for loop, while loop and do-while loop
What is break statement?
When a break is encountered inside a loop, the loop is terminated and the control passes to the statement following the body of the loop.

No comments:

Post a Comment