| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| program to find the ASCII value of a number | | 5 |
| how to sort two array of characters and make a new array of
characters. | Accenture | 1 |
| what does the following code do?
fn(int n,int p,int r)
{
static int a=p;
switch(n){
case 4:a+=a*r;
case 3:a+=a*r;
case 2:a+=a*r;
case 1:a+=a*r;
}
}
a.computes simple interest for one year
b.computes amount on compound interest for 1 to 4 years
c.computes simple interest for four year
d.computes compound interst for 1 year
| TCS | 3 |
| what is the difference between arrays and linked list | Tech-Mahindra | 7 |
| how to print "hai" in c? | | 9 |
| main()
{
printf(5+"Vidyarthi Computers");
} | | 5 |
| What is the function of ceil(X) defined in math.h do?
A)It returns the value rounded down to the next lower
integer
B)it returns the value rounded up to the next higher integer
C)the Next Higher Value
D)the next lower value | Accenture | 3 |
| program to find a smallest number in an array | Microsoft | 2 |
| write a c program to check weather a particluar bit is set
or not? | IBM | 2 |
| write a program to generate 1st n fibonacci prime number | | 4 |
| Write a program to interchange two variables without using
the third variable? | Accenture | 9 |
| write a program to check whether a given integer is a strong
number or not?
[Hint:
145=1!+4!+5!
=1+24+120
=145]
| | 2 |
| How do I declare an array of N pointers to functions
returning pointers to functions returning pointers
to characters?
| | 1 |
| f1()
{
f(3);}
f(int t)
{
switch(t);
{
case 2: c=3;
case 3: c=4;
case 4: c=5;
case 5: c=6;
default: c=0;}
value of c?
| Geometric-Software | 5 |
| How can I get Single byte from 'int' type variable? Can we
alter single bit or multiple bits in int type variable? if so,
How? | | 1 |
| to find the program of matrix multiplication using arrays | | 1 |
| write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
| Motorola | 2 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 3 |
| Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops. | | 3 |
| What are Storage Classes in C ? | HP | 6 |
| |
| For more C Interview Questions Click Here |