Sunteți pe pagina 1din 16

Top 100 C Questions Asked in Actual

Interviews
 Difference between arrays and
pointers?
http://www.coolinterview.com/interview/9
60
 What is the purpose of realloc( )?
http://www.coolinterview.com/interview/9
61
 What is static memory allocation and
dynamic memory allocation?
http://www.coolinterview.com/interview/9
62
 How are pointer variables initialized?
http://www.coolinterview.com/interview/9
63
 Are pointers integers?
http://www.coolinterview.com/interview/9
64
 What is a pointer variable?
http://www.coolinterview.com/interview/9
65
 What is a pointer value and address?
http://www.coolinterview.com/interview/9
66
 What is a method?
http://www.coolinterview.com/interview/9
67
 What are the advantages of the
functions?
http://www.coolinterview.com/interview/9
68
 What is the purpose of main( )
function?
http://www.coolinterview.com/interview/9
69
 What is an argument ? differentiate
between formal arguments and actual
arguments?
http://www.coolinterview.com/interview/9
70
 What is a function and built-in
function?
http://www.coolinterview.com/interview/9
71
 What is modular programming?
http://www.coolinterview.com/interview/9
72
 When does the compiler not implicitly
generate the address of the first
element of an array?
http://www.coolinterview.com/interview/9
73
 What are the characteristics of arrays
in C?
http://www.coolinterview.com/interview/9
74
 Differentiate between a linker and
linkage?
http://www.coolinterview.com/interview/9
75
 What are advantages and
disadvantages of external storage
class?
http://www.coolinterview.com/interview/9
76
 Diffenentiate between an internal
static and external static variable?
http://www.coolinterview.com/interview/9
77
 What are the advantages of auto
variables?
http://www.coolinterview.com/interview/9
78
 What is storage class and what are
storage variable ?
http://www.coolinterview.com/interview/9
79
 Which expression always return true?
Which always return false?
http://www.coolinterview.com/interview/9
80
 Write the equivalent expression for x
%8?
http://www.coolinterview.com/interview/9
81
 why n++ executes faster than n+1?
http://www.coolinterview.com/interview/9
82
 what is a modulus operator? What
are the restrictions of a modulus
operator?
http://www.coolinterview.com/interview/9
83
 What is the difference between a
string and an array?
http://www.coolinterview.com/interview/9
84
 Is it better to use a pointer to
navigate an array of values,or is it
better to use a subscripted array
name?
http://www.coolinterview.com/interview/9
85
 Can the sizeof operator be used to tell
the size of an array passed to a
function?
http://www.coolinterview.com/interview/9
86
 Is using exit() the same as using
return?
http://www.coolinterview.com/interview/9
87
 Is it possible to execute code even
after the program exits the main()
function?
http://www.coolinterview.com/interview/9
88
 What is a static function?
http://www.coolinterview.com/interview/9
89
 Why should I prototype a function?
http://www.coolinterview.com/interview/9
90
 How do you print an address?
http://www.coolinterview.com/interview/9
91
 Can math operations be performed on
a void pointer?
http://www.coolinterview.com/interview/9
92
 How can you determine the size of an
allocated portion of memory?
http://www.coolinterview.com/interview/9
93
 What is a "null pointer assignment"
error? What are bus errors, memory
faults, and core dumps?
http://www.coolinterview.com/interview/9
94
 What is the difference between NULL
and NUL?
http://www.coolinterview.com/interview/9
95
 What is the heap?
http://www.coolinterview.com/interview/9
96
 Can the size of an array be declared
at runtime?
http://www.coolinterview.com/interview/9
97
 What is the stack?
http://www.coolinterview.com/interview/9
98
 When should a far pointer be used?
http://www.coolinterview.com/interview/9
99
 What is the difference between far
and near?
http://www.coolinterview.com/interview/1
000
 Is it better to use malloc() or
calloc()?
http://www.coolinterview.com/interview/1
001
 Why should we assign NULL to the
elements (pointer) after freeing
them?
http://www.coolinterview.com/interview/1
002
 When would you use a pointer to a
function?
http://www.coolinterview.com
/interview/1003
 How do you use a pointer to a
function?
http://www.coolinterview.com/interview/1
004
 Can you add pointers together? Why
would you?
http://www.coolinterview.com/interview/1
005
 What does it mean when a pointer is
used in an if statement?
http://www.coolinterview.com/interview/1
006
 Is NULL always defined as 0?
http://www.coolinterview.com/interview/1
007
 What is a void pointer?
http://www.coolinterview.com/interview/1
008
 What is a null pointer?
http://www.coolinterview.com/interview/1
009
 How many levels of pointers can you
have?
http://www.coolinterview.com/interview/1
010
 What is indirection?
http://www.coolinterview.com/interview/1
011
 How do you print only part of a
string?
http://www.coolinterview.com/interview/1
012
 How can I convert a string to a
number?
http://www.coolinterview.com/interview/1
013
 How can I convert a number to a
string?
http://www.coolinterview.com/interview/1
014
 What is the difference between a
string copy (strcpy) and a memory
copy (memcpy)? When should each
be used?
http://www.coolinterview.com/interview/1
015
 How can you check to see whether a
symbol is defined?
http://www.coolinterview.com/interview/1
016
 How do you override a defined
macro?
http://www.coolinterview.com/interview/1
017
 What is #line used for?
http://www.coolinterview.com/interview/1
018
 What is a pragma?
http://www.coolinterview.com/interview/1
019
 What are the standard predefined
macros?
http://www.coolinterview.com/interview/1
020
 How can type-insensitive macros be
created?
http://www.coolinterview.com/interview/1
021
 How many levels deep can include
files be nested?
http://www.coolinterview.com/interview/1
022
 Can include files be nested?
http://www.coolinterview.com/interview/1
023
 Can you define which header file to
include at compile time?
http://www.coolinterview.com/interview/1
024
 What is the difference between
#include and #include "file"?
http://www.coolinterview.com/interview/1
025
 Is it better to use a macro or a
function?
http://www.coolinterview.com/interview/1
026
 How are portions of a program
disabled in demo versions?
http://www.coolinterview.com/interview/1
027
 What is the benefit of using an enum
rather than a #define constant?
http://www.coolinterview.com/interview/1
028
 What is the benefit of using #define
to declare a constant?
http://www.coolinterview.com/interview/1
029
 Can a file other than a .h file be
included with #include?
http://www.coolinterview.com/interview/1
030
 How can you avoid including a header
more than once?
http://www.coolinterview.com/interview/1
031
 What will the preprocessor do for a
program?
http://www.coolinterview.com/interview/1
032
 What is a macro, and how do you use
it?
http://www.coolinterview.com/interview/1
033
 What is Preprocessor?
http://www.coolinterview.com/interview/1
034
 How can I make sure that my
program is the only one accessing a
file?
http://www.coolinterview.com/interview/1
035
 How can I open a file so that other
programs can update it at the same
time?
http://www.coolinterview.com/interview/1
036
 How do you determine whether to
use a stream function or a low-level
function?
http://www.coolinterview.com/interview/1
037
 What is the difference between text
and binary modes?
http://www.coolinterview.com/interview/1
038
 How can you restore a redirected
standard stream?
http://www.coolinterview.com/interview/1
039
 How do you redirect a standard
stream?
http://www.coolinterview.com/interview/1
040
 How can I search for data in a linked
list?
http://www.coolinterview.com/interview/1
041
 How can I sort a linked list?
http://www.coolinterview.com/interview/1
042
 What is hashing?
http://www.coolinterview.com/interview/1
043
 What is the quickest searching
method to use?
http://www.coolinterview.com/interview/1
044
 What is the easiest searching method
to use?
http://www.coolinterview.com/interview/1
045
 How can I sort things that are too
large to bring into memory?
http://www.coolinterview.com/interview/1
046
 What is the quickest sorting method
to use?
http://www.coolinterview.com/interview/1
047
 What is the easiest sorting method to
use?
http://www.coolinterview.com
/interview/1048
 What is the benefit of using const for
declaring constants?
http://www.coolinterview.com/interview/1
049
 Can static variables be declared in a
header file?
http://www.coolinterview.com/interview/1
050
 What is the difference between
declaring a variable and defining a
variable?
http://www.coolinterview.com/interview/1
051
 Is it acceptable to declare/define a
variable in a C header?
http://www.coolinterview.com/interview/1
052
 When should a type cast not be used?
http://www.coolinterview.com/interview/1
053
 When should a type cast be used?
http://www.coolinterview.com/interview/1
054
 How can you determine the maximum
value that a numeric variable can
hold?
http://www.coolinterview.com/interview/1
055
 How reliable are floating-point
comparisons?
http://www.coolinterview.com/interview/1
056
 Can a variable be both const and
volatile?
http://www.coolinterview.com/interview/1
057
 when should the volatile modifier be
used?
http://www.coolinterview.com/interview/1
058
 When should the register modifier be
used? Does it really help?
http://www.coolinterview.com/interview/1
059

S-ar putea să vă placă și