C language question's for Interview's ,JNTU External Exam's ,Competitive Exam &Other many more.....
1. What is BCPL?
2. Who developed BCPL?
3. Who developed B language?
4. Who developed C language?
5. How do you make comments in C program?
6. How the name C is derived?
7. What is K & R C?
8. What is preprocessor statement?
9. Differentiate between constant and variable.
10.
What is data type?
11.
Name the basic data types of C.
12.
What is the use of stdio.h header file
13.
What is the Fibonacci sequence explain
logic
14.
What is prime number
15.
What is the general form and flowchart of
for statement
16.
What is the structure of c language
17.
What are the relational operators explain
each
18.
What is the use of printf () function
19.
What are the program development steps
20.
What is the use of scanf() function
21.
What is the difference between library
functions and user defined functions
22.
What is the use of math.h header file
23.
What is the flowchart? Which symbols are
used to construct flowchart
24.
What is the difference between compiler and
interpreter
25.
What is the general form and flowchart of
if statement
26.
What is the use of clrscr() function
27.
Define keywords. How many keywords are there
explain with examples
28.
Explain increment and decrement operators
with example
29.
What is factorial
30.
What is the definition of function
31.
Where are the auto variables stored?
32.
What is the difference between declaring a
variable and defining a variable?
33.
What is a static variable?
34.
What is a register variable?
35.
Where is an auto variable stored?
36.
What is scope & storage allocation of extern
and global variables?
37.
What is scope & storage allocation of
register, static and local variables?
38.
What are storage memory, default value, scope and
life of Automatic and Register storage class?
39.
What are storage memory, default value, scope and
life of Static and External storage class?
40.
What is the difference between 'break' and
'continue' statements?
41.
What is the difference between 'for' and 'while'
loops?
42.
Which bitwise operator is suitable for checking
whether a particular bit is ON or OFF?
43.
Which bitwise operator is suitable for turning
OFF a particular bit in a number?
44.
What is equivalent of multiplying an unsigned int
by 2: left shift of number by 1 or right shift of number by 1?
45.
What is an Enumeration Constant?
46.
What is a structure?
47.
What are the differences between a structure and
a union?
48.
What are the advantages of unions?
49.
How can typedef be to define a type of structure?
50.
Write a program that returns 3 numbers from a
function using a structure.
51.
Explain actual parameters and formal
parameters
52.
What are the different storage classes in
C?
53.
What are register variables? What are the
advantage of using register variables?
54.
Explain bitwise operators
55.
Explain tower of Hanoi problem
56.
What is the purpose of main() function?
57.
Explain command line arguments of main function?
58.
What are header files? Are functions declared or
defined in header files ?
59.
What are the differences between formal arguments
and actual arguments of a function?
60.
What is pass by value in functions?
61.
What is pass by reference in functions?
62.
What are the differences between getchar() and
scanf() functions for reading strings?
63.
Out of the functions fgets() and gets(), which
one is safer to use and why?
64.
What is the difference between the functions
strdup() and strcpy()?
65.
What is a pointer in C?
66.
What are the advantages of using pointers?
67.
What are the differences between malloc() and
calloc()?
68.
How to use realloc() to dynamically increase size
of an already allocated array?
69.
What is the equivalent pointer expression for
referring an element a[i][j][k][l], in a four dimensional array?
70.
Declare an array of three function pointers where
each function receives two integers and returns float.
71.
Explain the variable assignment in the
declaration int *(*p[10])(char *, char *);
72.
Write a program to find factorial of the given
number.
73.
Write a program to check whether the given number
is even or odd.
74.
Write a program to swap two numbers using a
temporary variable.
75.
Write a program to swap two numbers without using
a temporary variable.
76.
Write a program to swap two numbers using bitwise
operators.
77.
Write a program to find the greatest of three
numbers.
78.
Write a program to find the greatest among ten
numbers.
79.
Write a program to check whether the given number
is a prime.
80.
Write a program to check whether the given number
is a palindromic number.
81.
Write a program to check whether the given string
is a palindrome.
82.
Write a program to generate the Fibonacci series.
83.
Write a program to print "Hello World"
without using semicolon anywhere in the code.
84.
Write a program to print a semicolon without
using a semicolon anywhere in the code.
85.
Write a program to compare two strings without
using strcmp() function.
86.
Write a program to concatenate two strings
without using strcat() function.
87.
Write a program to delete a specified line from a
text file.
88.
Write a program to replace a specified line in a
text file.
89.
Write a program to find the number of lines in a
text file.
90.
Write a C program which asks the user for a
number between 1 to 9 and shows the number. If the user inputs a number out of
the specified range, the program should show an error and prompt the user for a
91.
Valid input.
92.
Write a program to display the multiplication
table of a given number.
93.
What is the use of break in switch case statement
94.
What is the general form and flowchart of do
while statement
95.
Which operator is called ternary operator
96.
Define operator. What are types of operators.
97.
Which statement is known as multiway decision
statement.explain the flow of logic?
98.
Where does
global, static, and local, register
99.
Difference between
arrays and linked list?
100.
What are
enumerations?
101.
Describe about
storage allocation and scope of
102.
What are
register variables? What are the advantages
103.
What is the use
of typedef?
104.
Can we specify
variable field width in a scanf()
105.
Out of fgets()
and gets() which function is safe to use and why?
106.
Difference
between strdup and strcpy?
107.
What is
recursion?
108.
What does
static variable mean?
109.
What is a
union?
110.
What are the
differences between structures and union?
111.
What are the
differences between structures and arrays?
112.
In header files
whether functions are declared or defined?
113.
What are the
differences between malloc () and calloc ()?
114.
What are
macros? What are its advantages and disadvantages?
115.
Difference
between pass by reference and pass by
116.
What is static
identifier?
117.
Where is the
auto variables stored?
118.
Differentiate
between a for loop and a while loop? What are it uses?
119.
What is storage
class.What are the different storage classes in C?
120.
What the
advantages of using Unions?
121.
What is the
difference between Strings and Arrays?
122.
What is a far
pointer? Where we use it?
123.
What is a huge
pointer?
124.
What is a
normalized pointer ,how do we normalize a pointer?
125.
What is near
pointer.
126.
In C, why is
the void pointer useful? When would you use it?
127.
What is a NULL
Pointer? Whether it is same as an uninitialized pointer?
128.
Are pointers
integer ?
129.
What does the
error ‘Null Pointer Assignment’ means and what causes this
130.
Error?
131.
What is generic
pointer in C?
132.
Are the
expressions arr and &arr same for an array of integers?
133.
How pointer
variables are initialized ?
134.
What is static
memory allocation ?
135.
What is dynamic
memory allocation?
136.
What is the
purpose of realloc ?
137.
What is pointer
to a pointer.
138.
Define string. What is the use of null terminator
139.
Explain declaration and initialization of string
variables
140.
If the string contains 9 elements so what is the
size of string
141.
What are the most commonly used string-handling functions?
Explain each
142.
Which header file is used for string handling
functions
143.
What is an
array of pointers ?
144.
Difference
between linker and linkage ?
145.
Is it possible
to have negative index in an array?
146.
Why is it
necessary to give the size of an array in an array declaration ?
147.
What modular
programming ?
148.
What is a
function ?
149.
What is an
argument ?
150.
What are built
in functions ?
151.
Difference
between formal argument and actual argument ?
152.
Is it possible
to have more than one main() function in a C program ?
153.
What is the
difference between an enumeration and a set of pre-processor # defines?
154.
How are
Structure passing and returning implemented by the complier?
155.
What is the
similarity between a Structure, Union and enumeration?
156.
How can we
read/write Structures from/to data files?
157.
Write a program
which employs Recursion ?
158.
Write a program
which uses Command Line Arguments?
159.
Difference
between array and pointer ?
160.
What do the ‘c’
and ‘v’ in argc and argv stand for?
161.
What are C
identifiers?
162.
What is the difference between character and
array
163.
How to declare character and string
164.
How to print character and string
165.
What is preincrement
and post increment ?
166.
Write a program
to interchange 2 variables without using the third one.
167.
What is the
maximum combined length of command line arguments
168.
Including the
space between adjacent arguments?
169.
What are bit
fields? What is the use of bit fields in a Structure declaration?
170.
What is a
preprocessor, What are the advantages of preprocessor ?
171.
What are the
facilities provided by preprocessor ?
172.
What are the
two forms of #include directive ?
173.
How would you
use the functions randomize() and random()?
174.
What do the
functions atoi(), itoa() and gcvt() do?
175.
How would you
use the functions fseek(), freed(), fwrite() and ftell()?
176.
What is the
difference between the functions memmove() and memcpy()?
177.
What is a file
?
178.
What is the use of \n?
179.
What is the use of \t?
180.
How to initialize the structure?
181.
What are the
types of file?
182.
What is a
stream ?
183.
What is meant
by file opening ?
184.
What is a file
pointer ?
185.
How is
fopen()used ?
186.
How is a file
closed ?
187.
What is a
random access file ?
188.
What is the
purpose of ftell ?
189.
What is the
purpose of rewind() ?
190.
Difference
between a array name and a pointer variable ?
191.
Represent a
two-dimensional array using pointer ?
192.
Difference
between an array of pointers and a pointer to an array ?
193.
90. Can we use
any name in place of argv and argc as command line arguments?
194.
What are the
pointer declarations used in C?
195.
What is roman numeral
196.
Explain logic how to convert roman numeral
into decimal
197.
How to convert binary to decimal
198.
How to convert decimal to binary
199.
Give the examples of hexadecimal nos
200.
What is the ascii values.what is the use
201.
One byte is how many bits.
202.
Explain binary ,decimal,octal,and
hexadecimal number
203.
What is the one’s complement and two’s
complement of binary number.explain with example?
204.
What is terminator?
205.
Differentiate
between a constant pointer and pointer to a constant ?
206.
Is the
allocated space within a function automatically deallocated when
207.
The function
returns?
208.
Discuss on
pointer arithmetic?
209.
What are the
invalid pointer arithmetic ?
210.
What are the
advantages of using array of pointers to string instead of an
211.
Array of
strings?
212.
Are the
expressions *ptr ++ and ++ *ptr same ?
213.
What would be
the equivalent pointer expression foe referring the same
214.
Element as
215.
A[p][q][r][s] ?
216.
Are the
variables argc and argv are always local to main ?
217.
Can main () be
called recursively?
218.
Can we
initialize unions?
219.
What’s the
difference between these two declarations?
220.
Why doesn’t
this code: a[i] = i++; work?
221.
Why doesn’t
struct x { … };x thestruct; work?
222.
Why can’t we
compare structures?
223.
How are
structure passing and returning implemented?
224.
What is the
difference between text and binary modes?
225.
What is static
memory allocation and dynamic memory allocation?
226.
What is
indirection?
227.
How many levels
deep can include files be nested?
228.
What is an lvalue?
229.
C statement ended with which operator?
230.
Differentiate
between an internal static and external static variable?
231.
What is the
difference between a string and an array?
232.
What is an
argument? Differentiate between formal arguments and actual
233.
Arguments?
234.
When should a type
cast not be used?
235.
Differentiate
between a linker and linkage?
236.
What is a function
and built-in function?
237.
Why should I
prototype a function?
238.
What is the structure within structure
239.
What
is a NULL Pointer? Whether it is same as an uninitialized pointer?
240.
What
is a NULL Macro? What is the difference between a NULL Pointer and a NULL
Macro?
241.
What
does the error 'Null Pointer Assignment' mean and what causes this error?
242.
What
is near, far and huge pointers? How many bytes are occupied by them?
243.
How
would you obtain segment and offset addresses from a far address of a memory
location?
244.
Are
the expressions arr and &arr same for an array of integers?
245.
Does
mentioning the array name gives the base address in all the contexts?
246.
Explain
one method to process an entire string as one unit?
247.
What
is the similarity between a Structure, Union and enumeration?
248.
Can
a Structure contain a Pointer to itself?
249.
How
can we check whether the contents of two structure variables are same or not?
250.
How
are Structure passing and returning implemented by the complier?
251.
How
can we read/write Structures from/to data files?
252.
What
is the difference between an enumeration and a set of pre-processor # defines?
253.
What
do the 'c' and 'v' in argc and argv stand for?
254.
Are
the variables argc and argv are local to main?
255.
What
is the maximum combined length of command line arguments including the space
between adjacent arguments?
256.
If
we want that any wildcard characters in the command line arguments should be
appropriately expanded, are we required to make any special provision? If yes,
which?
257.
Does
there exist any way to make the command line arguments available to other
functions without passing them as arguments to the function?
258.
What
are bit fields? What is the use of bit fields in a Structure declaration?
259.
To
which numbering system can the binary number 1101100100111100 be easily
converted to?
260.
Which
bit wise operator is suitable for checking whether a particular bit is on or
off?
261.
Which
bit wise operator is suitable for turning off a particular bit in a number?
262.
Which
bit wise operator is suitable for putting on a particular bit in a number?
263.
Which
bit wise operator is suitable for checking whether a particular bit is on or
off?
264.
Which
one is equivalent to multiplying by 2:Left shifting a number by 1 or Left
shifting an unsigned int or char by 1?
265.
Write
a program to compare two strings without using the strcmp() function.
266.
Write
a program to concatenate two strings.
267.
Write
a program to interchange 2 variables without using the third one.
268.
Write
programs for String Reversal & Palindrome check
269.
Write
a program to find the Factorial of a number
270.
Write
a program to generate the Fibinocci Series
271.
Write
a program which employs Recursion
272.
Write
a program which uses Command Line Arguments
273.
Write
a program which uses functions like strcmp(), strcpy()? Etc
274.
What
are the advantages of using typedef in a program?
275.
How
would you dynamically allocate a one-dimensional and two-dimensional array of
integers?
276.
How
can you increase the size of a dynamically allocated array?
277.
How
can you increase the size of a statically allocated array?
278.
When
reallocating memory if any other pointers point into the same piece of memory
do you have to readjust these other pointers or do they get readjusted automatically?
279.
Which
function should be used to free the memory allocated by calloc()?
280.
How
much maximum can you allocate in a single call to malloc()?
281.
Can
you dynamically allocate arrays in expanded memory?
282.
What
is object file? How can you access object file?
283.
Which
header file should you include if you are to develop a function which can
accept variable number of arguments?
284.
Can
you write a function similar to printf()?
285.
How
can a called function determine the number of arguments that have been passed
to it?
286.
Can
there be at least some solution to determine the number of arguments passed to
a variable argument list function?
287.
How
do you declare the following:
a.
An
array of three pointers to chars
b.
An
array of three char pointers
c.
A
pointer to array of three chars
d.
A
pointer to function which receives an int pointer and returns a float pointer
e.
A
pointer to a function which receives nothing and returns nothing
288.
What
do the functions atoi(), itoa() and gcvt() do?
289.
Does
there exist any other function which can be used to convert an integer or a
float to a string?
290.
How
would you use qsort() function to sort an array of structures?
291.
How
would you use qsort() function to sort the name stored in an array of pointers
to string?
292.
How
would you use bsearch() function to search a name stored in array of pointers
to string?
293.
How
would you use the functions sin(), pow(), sqrt()?
294.
How
would you use the functions memcpy(), memset(), memmove()?
295.
How
would you use the functions fseek(), freed(), fwrite() and ftell()?
296.
How
would you obtain the current time and difference between two times?
297.
How
would you use the functions randomize() and random()?
298.
How
would you implement a substr() function that extracts a sub string from a given
string?
299.
What
is the difference between the functions rand(), random(), srand() and
randomize()?
300.
What
is the difference between the functions memmove() and memcpy()?
301.
How
do you print a string on the printer?
302.
Can
you use the function fprintf() to display the output on the screen?
303.
How to reduce a final size of executable?
304.
Can you tell me how to check whether a linked list is circular?
305.
String Processing --- Write out a function that prints out all the
permutations of a string. For example, abc would give you abc, acb, bac, bca,
cab, cba.
Why does malloc(0) return valid memory address ? What's the use ?
Why does malloc(0) return valid memory address ? What's the use ?
306.
Can
static variables be declared in a header file?
How can you determine the size of an allocated portion of memory?
How can you determine the size of an allocated portion of memory?
307.
What is page thrashing?
308.
How can you check to see
whether a symbol is defined?
309.
How do you override a
defined macro?
310.
How can I search for data
in a linked list?
311.
When does the compiler
not implicitly generate the address of the first element of an array?
312.
How do you print an
address?
313.
What is the benefit of
using const for declaring constants?
314.
What is the easiest
sorting method to use?
315.
How many levels of
pointers can you have?
316.
What is a pragma?
317.
What is #line used for?
318.
Hanoic problem
in c?
319.
Types of linkedlist?
320.
Difference
between Circular linked list and Circularly doubly linked list?
321.
Is Struct a
datatype?
322.
Which sorting algorithm is the best if the
list is already in order?
323.
The extra key inserted at the end of the
array is?
324.
Are the expressions *ptr ++ and ++ *ptr same?
325.
Differentiate between a constant pointer and pointer
to a constant?
326.
Can a Structure contain a Pointer to itself?
327.
What are the uses of a pointer?
328.
What is a memory leak?
329.
What is the difference between Merge Sort and Quick
sort?
330.
What if the file already exists?
Write a program to print a semicolon without using a semicolon anywhere in the code.
Write a program to print a semicolon without using a semicolon anywhere in the code.
331.
Differentiate between string constant and character
constant.
332.
What is the range of integer, char, float for a
16-bit computer?
333.
What is a statement?
334.
What is a keyword?
335.
Differentiate between keywords and identifiers.
336.
What is the need for an escape sequences?
337.
What is a symbolic constant?
338.
How do you classify C operators?
339.
What is the use of modulus operator?
340.
What is meant by mixed mode operation?
341.
What are bitwise operators?
342.
What is unary operator?
343.
What is binary operator?
344.
What is typecasting?
345.
What is a conditional / ternary operator?
346.
What is need for type conversion?
347.
Differentiate between && and &.
348.
Differentiate between pre-increment/decrement &
post-increment/decrement.
349.
Differentiate between Unformatted and formatted i/o
statements.
350.
How do you classify the control statements?
351.
Differentiate between while and do-while loop.
352.
Differentiate between break and continue.
353.
When do you prefer for loop statement?
354.
What is looping?
355.
What is an array?
356.
Give the classification of arrays?
357.
Differentiate between an array and an ordinary
variable.
358.
Array variable is also called as ______.
359.
What are character arrays?
360.
When do you use two-dimensional character array?
361.
Name the different string handling functions?
362.
What is meant by modularization?
363.
Differentiate between standard functions &
user-defined functions?
364.
Differentiate between arguments and parameters.
365.
Differentiate between local and global variables.
366.
Name the different methods of parameter passing?
367.
How does the function definition differ from
function declaration?
368.
What is recursive function?
369.
What is meant by scope of a variable?
370.
What is a structure?
371.
Differentiate between array and structure.
372.
What are embedded structures?
373.
How do you access the member of a structure?
374.
Differentiate between address operator and
dereferencing operator.
375.
What are the operations performed on the
queue
376.
What is the value of rear and front at each
insertion and deletion of element in the queue
377.
How to know the queue is full or not
378.
What is the difference between the stack
and queue
379.
What is the circular queue
380.
What is the advantage of circular queue
over linear queue
381.
Can variable names start with numerical
values?
382.
What is the maximum size of variable name.
383.
What is the condition of queue full and
underflow
384.
What is the initial value of rear and front
385.
What are the formatted input and output
functions
386.
What is the difference between getch and
gets
387.
What are the applications of stack
388.
Define infix, prefix and postfix with
example
389.
Explain with algorithm to convert infix to
prefix expression
390.
Explain with algorithm to convert infix to
postfix expression
391.
Explain with algorithm to postfix
evaluation
392.
What is the order of precedence of
operators
393.
Define binary tree
394.
What are types of tree traversal
395.
How to represent the tree
396.
Define graph
397.
What are the types of searching methods
398.
How to search the value using linear search
399.
In which search method elements should be
in sorted order
400.
What is advantage of linear search
401.
What is the disadvantage of linear search
402.
What is the advantage of binary search
403.
What is the disadvantage of binary search
404.
What is the use of free()in dynamic memory
allocation
405.
How to search the value using binary search
406.
What is the diff between linear search and
binary search
407.
How to find the mid in binary search method
408.
Explain logic how sort the elements in
bubble sort.
409.
What is the use of dot operator in the
structure
410.
What is the size of structure
411.
What is the use of sizeof operator
412.
What is the time complexity of bubble sort
in the best and worst cases
413.
Explain logic how sort the elements in
insertion sort
414.
What is the time complexity of insertion
sort in the best and worst cases
415.
What is the difference between bubble sort
and insertion sort
416.
What are the of sorting and searching
methods
417.
What is the use of conio.h header file
418.
What is the general form and flowchart of
nested if statement
419.
Explain logic how sort the elements in
merge sort
420.
What is the time complexity of merge sort
in the best and worst cases
421.
What is the difference between bubble sort
and merge sort
422.
What is the difference between quick sort
and merge sort
423.
What is the use of getch() in main().
424.
The preprocessor command starts with which
symbol?
425.
What is the lagrange interpolation formula
426.
Which formula is used to calculate the mid
in binary search
427.
Give two examples of syntax errors
428.
What are the types of array?
429.
What is a spanning tree?
430.
What is the linear regression formula?
431.
Define minimal spanning tree?
432.
What are various traversals in a tree?
433.
What are the advantages and disadvantages
of stack?
434.
What do you mean by sorting and searching?
435.
What are the unary operators?
436.
What is the trapezoidal method?
0 comments:
Post a Comment