1. What do you mean by Program? Briefly describe the basic structure of C programs.
2. What is a token? Differentiate between a for loop and a while loop? What are it uses?
3. What is a data type? Differentiate between array and pointer. Write a program to interchange 2 variables without using the third one.
4. What is an array of pointers? Is it possible to have negative index in an array? Why is it necessary to give the size of an array in an array declaration?
5. Submit a Report "the impact of improving debugging skill on programming ability".
Basically structure of the C program is divided into six different sections,
Documentation section: The Documentation section consists of a set of comment lines.
Link section: The link section provides instruction to the compiler to link the header files or functions from the system library.
Definition section: The definition section defines all symbolic constants by using the #define directive.
Global declaration section: There are some variables that are used in more than one function, such variables are called global variables.
In C there are two types of variable declaration,
Local variable declaration: Variables that are declared inside the main function.
Global variable declaration: Variables that are declared outside the main function.
A token is a single element of a programming language. There are 5 token categories :
A data type is a classification of data that tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support various types of data, including integer, real, character or string, and Boolean
An array of pointers is an array that consists of variables of pointer type, which means that the variable is a pointer addressing some other element.
Comments
Leave a comment