Totel:206 Click:
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
C Interview Questions And Answers
Page 1
Questions 1 What is C language?
Answer
programming language
Answer
C is a middle level programing language. C is a
structured, procedural programming language.c
widely used both for operating systems and
applications.C is also called a system progmming
language
Answer
The c language is a programming language
Answer
C is high level language.
Answer
C is a Structured Oriented Programming Language
Answer
c is structure programing language.
Answer
middle level,structured prigramming language
Answer
c is boaring language.... i hate this language,
Questions 2 What is the output of printf("%d")?
Answer
0
Answer
0
Answer
Any integer value
Answer
Any integer value
Answer
the output of this statement depends on data types %d is the data type of int type variabe if you will declare the variable in declaration part suppose u will declare int i so the output of this statement is i...............
Answer
the output of this statement depends on data types %d is the data type of int type variabe if you will declare the variable in declaration part suppose u will declare int i so the output of this statement is i...............
Answer
garbegge value
Answer
garbage integer value
Answer
Garbage Value
Questions 3 What is the difference between "calloc(...)" and "malloc(...)"?
Answer
Some important distance between calloc and malloc are given below:
malloc:
malloc takes only the "size" of the memory block to be allocated as input parameter.
malloc allocates memory as a single contiguous block.
if a single contiguous block cannot be allocated then malloc would fail.
calloc:
calloc takes two parameters: the number of memory blocks and the size of each block of memory
calloc allocates memory which may/may not be contiguous.
all the memory blocks are initialized to 0.
it follows from point 2 that, calloc will not fail if memory can beallocated in non-contiguous blocks when a single contiguous blockcannot be allocated.
Answer
malloc: malloc create the single block of given size by user
calloc: calloc creates multiple blocks of given size
both return void pointer(void *)so boh requires type casting
malloc: eg:
int *p;
p=(int*)malloc(sizeof(int)*5)
above syntax tells that malloc occupies the 10 bytes memeory and assign the address of first byte to P
calloc: eg:
p=(int*)calloc(5,sizeof(int)*5)
above syntax tells that calloc occupies 5 blocks each of the 10 bytes memeory and assign the address of first byte of first block to P
Questions 4 What is the difference between "printf(...)" and "sprintf(...)"?
Answer
the printf() function is supposed to print the output to stdout.In sprintf() function we store the formatted o/p on a string buffer.
Answer
"printf(....)" is standard output statement
and
"sprintf(......)" is formatted output statement
Questions 5 How to reduce a final size of executable?
Answer
Do not include unnecessary header files and
Do not link with unneccesary object files.
Answer
Use dynamic linking.
Goto Page:
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
C Objective Questions And Answers
C Objective Questions And Answers
C Interview Questions And Answers
C Interview Questions And Answers
R4R,C Objective, C Subjective, C Interview Questions And Answers,C,C Interview,C Questions ,C Answers