General C
Questions
*******************
How C program
compiles and linking ?
GCC and it's
options, what is make file ?
What is volatile
? Why we go for vollt ? What is optimization ?
Example program
of volatile ? Applications using volatile variable ? Where it will store in RAM
? Can
a variable be both const and volatile?
What is Static ?
applications of static keyword ? if i extern a static variable, which stage
that error will be identified ? Scope ?
Different type
of datatypes ? int,uint,char.. long ?
What if do
multiply unit,int ? that cast conversion is needed ?
What is the
application of const qualifier ?
What is reg data
type ? where you use it ? Scope ?
All mem related
functions like memcpy, memmove,
memchr, memset,
bzero ? Esxpecially How do you find overlap in memmove and how do you copy data
from src to dest ?
Swap two
variables without using temp, ExoR, single line, using +,-
How does free()
knows allocated memory ?
How do you
define a variable argument function ? Use va_arg, va_start,va_end macros.
How do you find
the size of a variable without using sizeof opr?
What is
recursion and applications of recursive ?
Get the inputs like 10,20,30,40,50 and print it in reverse
order, Dont use array. Dont expect Stack-LinkedList implementation. Use
recursive method.
Four parts of RAM and what are the variables stored in all fours
parts? BSS ? How BSS value gets intialized ?
How do you print value stores in 0x00123 address ? Can we assign
the address to a pointer ? Might be in DOS, far pointer concepts.
How do you avoid twice inclusion of same header file ? using #if
define
Write a program
to find the square root of the number without using the any mathematical
function ?
Is size of int
depends on machine or compiler ? size of pointer ?
ARRAY:
******
In an array,
linear search, binary search,
How do you find
duplicate in an array and remove it ?
Addition/Deletion
of an element in an array at n th position ?
Reverse of an
array[string,int]
sorting an
array[bubble,select,...look DS Questions]
Memory
allocation for single dimension array, two dimentsional array, three dimension
array using malloc. Differnt ways of allocation memory for 2 dimen array.
How do you pass
all the arrays to a func ?
How do you
intialize all the dimensional arrays ? What is the value of other location if
the array is partially initialized ?
static array
means ? application ?
Array of
pointers, pointer to an array ? array of funtion pointers ?
How do you
intialize above pointers ?
Matrix addition,
multiplications.
STRING:
*******
Defintions for
all string handling functions like
strlen,strcpy,strncpy,strcat,strncat,strstr,strrev
strrev - using
recursive, without any buffer
strstr - own
defintions
strcmp - ow defn
Reverse the
words from a statement ? I am a boy==> boy a am I
insert word in
between given string
Where string
constant will store ? scope of that const ?
Find out the no
of words,lines,chars in a given file ?
find the length
of given string buffer, without using loop and str func. Use printf
FUNCTION:
*********
function pointer
? different set of fptr declarations ?
know the spiral
rule ? declare a fptr returns fptr itself ?
call by
value/call by reference
Stack is related
to a func or a process[Moto] ?
How does the
stack grows when a f1 calls f2 ? Draw and explain how local var, return add is
being stored ? SP,PC reg ?
argc,argv means
? usage of that variables ?
What is function
prototype ?
What is inline
func and why do we need ?
what is
reentrant function ? where it stores ?
Write a function
to add two 16-bit numbers it will return
TRUE
- in case of overflow in the
result
FLASE - if there is no overflow
How do you
manage 2 stacks using single array of buffer ?
BITWISE
OPERATIONS:
*******************
How do you
set/reset a bit in an integar ?
Count of no of
bits set in an int ?
Reverse the bits
in an int ?
Find out the
given no id odd/even and power of two ?
What is
little/big endian, find out machine endian ?
Convert big to
little endian and viceversa ? ntoh ? hton ?
Multiply the
given two nos withoug using * ?
Swap two bits in
an integar ?
Convert
int<->binary int to hex, int to hex, Get to know the common function
definition.
Sum of digits of
given no ? Palindrome ?
STRUCTURE AND
UNION:
*********************
Difference btw
struct and union ?
Struct padding ?
How do you avoid ? Size of given struct ?
__attribute__()
and #define pragma pack(1)
Recursive struct
declaration ?
Can we have
union under union ?
How do you have
structure pointer in it's own structure ?
Array of
structures ? passings struct into a function ?
Find out the
offset of given struct member, when u have no pointer to that struct ?
POINTERS:
**********
Applications of
pointer ? Speciality of pointer ?
Pointer
addition/deletion.
Allocate memory
to pointer ?
typecasting
pointers ?
Pointer to
single,two,three dimensional arrays ? memory allocate ?
pointer with
const qualifier ? conts int *a, int *const a diff ?
A function which
defines a 2D array and return pointer, The caller able to get the address and
can access it. Write a program.
Size of pointer
?
What is FILE
pointer ? How it's being used ?
What is NULL
pointer ? void pointer ?
Difference
Questions
*********************
Diff btw enum
constant and #define const ?
Diff btw inline
func and #define func ?
Diff btw #ifdef
and #if define ?
Diff btw char
const and string const ?
Diff btw
declaration and definitions ?
Diff btw
#include "" and <> ?
Diff btw
auto,static,reg,extern ?
Diff btw
malloc,calloc ?
Diff btw
pointers and arrays ?
DATA STRUCTURES:
*****************
[STACK,QUEUE,LINKEDLIST,HASHING,BINARYTREE,SEARCH,SORTING]
Stack [implement
using LL,array]
Push,Pop,Peep,
Queue [implement
using LL,array]
Insert,Delete,
Circular
Queue[using LL and array]
Add/Delete/Searching/
Priority
Queue[Arrays, LL]
Add/Delete
Linked List:-
Single/double
Addition,Deletion - (start,end,middle,nth
position,count)
[ascend/descend order] copy LL, Delete LL,
Append 2 LL
reverse,recursive_Reverse,Sorting,concat2list,remove duplicates,
delete_current_node(no head pointer
available)
insert/delete n th element from last.
How do you convert doubly linked list to
single without using
structures?
In which data structure, elements can be
added or removed at
either end, but not in the middle? Dequeue
Find out the character that repeats itself
in a big arrays[1000
characters in it]
What is the most efficient way of finding a
loop in linklist.
Add element in the middle of LL with single
traversal.
Binary Tree
Add/Delete/print(inorder,preorder,postorder)
Application/ -Arithmetic Expresssion,
SymbolTable
construction,Syntax analysis.
What is No of nodes/depth/size of tree
relations.
AVL Tree
Add/Delete/
Application
Searching
Linear,Divide&conquer,BinarySearch
Sorting
Bubble,Selection,Quick,Merge,
HASH -
Addition/Deletion/Applications.
No comments:
Post a Comment
Thanks for your valuable comments