| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is array? | | 5 |
| hat is a pointer? | Assurgent | 3 |
| What is the diffrent between while and do while statement ? | | 3 |
| void main()
{
int i=5;
printf("%d",i+++++i);
}
| ME | 12 |
| What is macro? | IBM | 3 |
| pick out the odd one out of the following
a.malloc()
b.calloc()
c.free()
d.realloc()
| TCS | 1 |
| what is compiler | | 5 |
| write a C code To reverse a linked list | Motorola | 1 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used. | Persistent | 2 |
| helllo sir
give me some information of the basic information the
c as printf ,scanf , %d ,%f and why is the main use of
these. | | 3 |
| Which of the following sorts is quickest when sorting the
following set: 1 2 3 5 4
1) Quick Sort
2) Bubble Sort
3) Merge Sort
| | 3 |
| a memory of 20 bytes is allocated to a string declared as
char *s then the following two statements are executed:
s="Etrance"
l=strlen(s);
what is the value of l ?
a.20
b.8
c.9
d.21
| TCS | 2 |
| What is memmove? | Oracle | 1 |
| the factorial of non-negative integer n is written n! and
is defined as follows:
n!=n*(n-1)*(n-2)........1(for values of n greater than or
equal to 1 and
n!=1(for n=0)
Perform the following
1.write a c program that reads a non-negative integer and
computes and prints its factorial.
2. write a C program that estimates the value of the
mathematical constant e by using the formula:
e=1+1/!+1/2!+1/3!+....
3. write a c program the computes the value ex by using the
formula
ex=1+x/1!+xsquare/2!+xcube/3!+....
| Ignou | 1 |
| Given an array of length N containing integers between 1
and N, determine if it contains any duplicates. | | 2 |
| How to set a variable in the environment list? | | 1 |
| int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15
| Wipro | 6 |
| Write a program to compare two strings without using the
strcmp() function | Accenture | 6 |
| Implement a function that returns the 5th element from the
end in a singly linked list of integers in one pass. | Microsoft | 2 |
| |
| For more C Interview Questions Click Here |