Wednesday, 28 August 2013

C Programming One Mark Questions and Answers for Tamilnadu Polytechnic L Scheme Syllabus



1.Define program.
Program is defined as a sequence of instructions written to perform a well defined task with a computer.

2.What is program development cycle?
Program development cycle is a step by step procedure used to build computer program.

3.What is programming language?

Programming language is defined as a method for communication between man and computer that uses a set of predefined words. These words are combined into a program according to syntax (rules).

4.Give the general forms of ellipse() function.
void ellipse (int x, int y, int sa, int ea, int xr, int yr)

5.Define function.
Userdefined function or a function is defined as a group of statements by the programmer to carry out some specific well defined task.

6.Define array?
An array is defined as a group of related data items stored by means of single variable name.

7.How to initialize array?
We can initialize the elements of arrays in the same way as the ordinary variables when they are declared. General form: type array-name[size] = {list of values};

8.What is memory allocation?
 Memory allocation is a process of managing the computer memory. In this, the available memory is allocated to the variables in the programs and frees the memory when no longer needed by programs.

9.What are the types of memory allocation?
  • Static memory allocation.
  • Dynamic memory allocation.
10.What is pointer expression?
 Pointer expression is a linear combination of pointer variables, variables and operators (+,-,++,--). Pointer expression gives either numerical output or address output.
•    *P+*Qwhere P,Q-already defined pointer variable
•    *(P+1)Sum-already defined variable
•    *(--P) + Sum
•    P + Q

11.Write a feature of pre-processor.
  • Macro expansion            
  • File inclusion 
  • Conditional Compilation            
  • Miscellaneous directives

12.What are the types of pre-processor directives?
  • Macro substitution directive
  • File inclusion directive
  • Compiler control directive

13.What are random access files?
Random access files are files in which the user or programmer can move the file pointer randomly and can do read or write options.
i) ftell, ii) rewind and iii) fseek

14.Give the general form of #define.
#defined identifier (a1,a3…an) symbol
#defined – pre-processor directive
Identifier – valid C name used in the source program.
(a1,a3…an) – formal macro arguments
Symbol – this value is substituted to the formal arguments during processing.

15.Define file inclusion directive.
#include directive is encountered, the pre-processor inserts the entire content of the filename into the source code of the program. Ex: #include<stdio.h>,#include”myfile.c”


Post a Comment

Related Posts Plugin for WordPress, Blogger...