| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| Can we write a program without main() function? | | 9 |
| 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 |
| what is calloc and malloc? | | 1 |
| what is a static function | Satyam | 10 |
| main is a predefined or user define function
if user defined why?
if predefined whay? | TCS | 2 |
| How can we see the Expanded source code and compiled code
for our source program in C? | | 1 |
| a number is perfect if it is equal to the sum of its proper
divisor..
6 is perfect number coz its proper divisors are 1,2 and
three.. and 1+2+3=6...
a number is deficient if the sum of its proper divisor is
less than the number..
sample: 8 is deficient, coz its proper divisors are 1,2 and
4, and 1+2+4=7.
abundant number, if the sum of its proper divisor is greater
than the number..
sample..12 is abundant coz 1+2+3+4+6=16 which is geater than 12.
now write a program that prompts the user for a number, then
determines whether the number is perfect,deficient and
abundant.. | | 1 |
| what will happen if you free a pointer twice after
allocating memory dynamically ? | Novell | 2 |
| How we add our function in liabrary as liabrary function.
Exp. we want use our int factorical(int); function as int
pow(int,int); function working in math header file. | | 1 |
| Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program
| TCS | 12 |
| Program to find the value of e raised to power x using while
loop | N-Tech | 3 |
| write a program to search for an element in a given array.
If the array was found then display its position otherwise
display appropriate message in c language | | 3 |
| What kind of sorting is this?
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1
2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;
3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort | Accenture | 3 |
| Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?
| Oracle | 3 |
| Write a c code segment using a for loop that calculates and
prints the sum of the even integers from 2 to 30, inclusive? | | 2 |
| Why doesn't the code "a[i] = i++;" work? | | 4 |
| How to calculate Total working time using Login and
logout? | Wipro | 2 |
| what is difference between c and c++ | | 3 |
| to find out the reverse digit of a given number | Infosys | 5 |
| |
| For more C Interview Questions Click Here |