In this we are going to discuss C language important questions for exams ( Special for BCA & B. Tech ). These questions are take from previous year exams paper of different universities and collages.
C Language Important Questions For Exams | Asked in Previous Year Questions Papers
Que : Explain Basic Structure Of C Program ?
All C programs have to follow a basic structure. A C program starts with a main function and executes instructions present in it. Each instruction is terminated with a semicolon ( ; ) .
There are some rules which are applicable to all the C programs :
- Every program ‘s execute start from main function ().
- All the statements are terminated with a semicolon ( ; ).
- Instructions are case – Sensitive.
- Instructions are executed in the same order in which they are written.
Exampel of c program is go from here.
Que : What is algorithm ?
An algorithm is list of instructions and rules that a computer needs to do complete a task.
Que :Define variable name , explain with example and also define the rules of variable declaration ?
Variable name is the name of memory location wher we store some value, value of variable may be change during execution but variable name not be changed. It is a container where we store our value.
a = 3;
# (a is a variable name & 3 is value )
_bvalue = 4;
# (_bvalue is a variable name & 4 is value )
c = 2;
Rules for declaring a variable name :
- First character must be an alphabet or underscore ().
- No commas and blank space allowed .
- No special symbol are allowed other than ().
- Variable names are case sensitive
C Language Important Questions For BSC , BCA and B. Tech Exams
Que : What is header file ?
C language has numerous libraries that include predefine functions to make programming easier. In C language , header files contain the set of predefine standard libraries functions. In C we also create our own header files and include them in our program. Header files of c are saved with .h extension. There are two types of header files . The files that the programmer writes and the files that comes with your compiler.
Syntax : #include <filename.h> or #include "filename.h"
Que : What is file pointer ?
A file pointer is a pointer to a structure , which contain information about the file including its name , current position of the file , weather the file is being read or written , and weather errors or end of the occurred. The user does not need to know the details , because the definitions obtain from stdio.h include a structure declaring called FILE. The only declaration needed for a file pointer is symbolized by
This says that fp is the file pointer that points to a FILE structure.
The fopen() functions opens a stream for use and links a file with that stream.
FILE 8fopen(const char* filename, const char *mode);
|Mode||Meaning of Mode|
|r||Open a text file reading|
|w||Create a text file writing|
|a||Append to a text file|
|rb||Open a binary file for reading|
|wb||Create a binary file for writing|
|ab||Append to a binary file|
|r+||Open a text file for read or write|
|w+||Create a text file for read and write|
|a+f||Append or create a text file for read/ write|
|r+b||Open a binary file for read / write|
|w + b||Create aa binary file read / write|
|a+b||Append a binary for read/write|
Que : What is data type ? State different types of data types supported by C with examples ?
Que : What is a constant ? Write different type of constant in C with example ?
QUE : Define Systems Software ?
Que : Define the syntax and example for If – Else statement ?
Que : What is the difference between break and continue ?
Que : How to declare and initialize two dimensional array ?
Que : Difference between Strcmp() and Strmpl() ?
Que : What is Mallac() and Collac() ?
Que : Give the difference between * and & in C pointer ?
Que : What is command line argument ?
Que : Explain formatted input output function in C ?
Que : Explain Binary operator in C with examples ?
Que : Explain different type of user define functions in C with examples ?
Que : Explain call by value and call by reference with examples ?
Que : Explain array of structures with an example ?
Que : Explain different modes of opening a file.
Que : Write a C program to copy contents of one file two another?
Que : Define Local variable and Global variable ?
Que : While loop- and Do – While loop?
Que : Discuss Logical and Relational operators with examples ?
Que : What is Operator ? Explain Ternary or Conditional Operator with example .
Que : Discuss switch statement with proper example .
Que : Explain do____ while loop with examples .
Que : Write a ‘ C’ program to find sum of odd numbers between 1 to 100 .
Que : Explain for loop ?
Que : Discuss about continue statement ?
Que : Define Flowchart. Draw the basic symbols of flow chart and state its, usage .
Que : What are the major components of C program ? State significance of the name ‘main’ .
Que : Explain the brief the features of C language ?
Que : What is meant by looping ?
In this blog I think we provide all important questions about C Language . All C language important questions are taken from previous year exam papers from different universities and collages.
C language is most Important for