| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| #define f(x)
main()
{
printf("\n%d",f(2+2));
} | | 3 |
| 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 to find out the biggest element (or any other
operation) in an array which is dynamic. User need not to
mention the array size while executing. | | 2 |
| Write a C++ program without using any loop (if, for, while
etc) to print numbers from 1 to 100 and 100 to 1;
| | 7 |
| 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 | 2 |
| How to convert a binary number to Hexa decimal number??
(Note:Do not convert it into binary and to Hexadecimal) | Subex | 1 |
| Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc | | 2 |
| a C prog to swap 2 no.s without using variables just an
array? | TCS | 4 |
| pgm to find number of words starting with capital letters
in a file(additional memory usage not allowed)(if a word
starting with capital also next letter in word is capital
cann't be counted twice) | Subex | 1 |
| what are the uses of structure? | HCL | 5 |
| 2. Counting in Lojban, an artificial language developed
over the last fourty years, is easier than in most languages
The numbers from zero to nine are:
0 no
1 pa
2 re
3 ci
4 vo
5 mk
6 xa
7 ze
8 bi
9 so
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
numbers.
| Nagarro | 2 |
| size maximum allocated by calloc() | DELL | 1 |
| Which of these statements are false w.r.t File Functions?
i)fputs() ii)fdopen() iii)fgetpos() iv)ferror()
A)ii B)i,ii C)iii D)iv
| Accenture | 5 |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 2 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| How to avoid structure padding in C? | Tech-Mahindra | 4 |
| how to find the binary of a number? | Infosys | 5 |
| 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 | 4 |
| Define function ?Explain about arguments? | Geometric-Software | 2 |
| what is difference b/w extern & volatile variable?? | Teleca | 2 |
| |
| For more C Interview Questions Click Here |