| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 |
| # define prod(a,b)=a*b
main()
{
int x=2;
int y=3;
printf("%d",prod(x+2,y-10)); }
the output of the program is
a.8
b.6
c.7
d.none
| TCS | 5 |
| post new interiew question and aptitude test papers | | 1 |
| Average of a couple 10 years ago was 25. The average
remains same after having a child and twins after 3 years.
What is the present age of the first child | IBM | 9 |
| write a C code To reverse a linked list | Motorola | 1 |
| study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above | Accenture | 12 |
| how to find out the inorder successor of a node in a tree?? | TCS | 2 |
| which of the function operator cannot be over loaded
a) <=
b)?:
c)==
d)*
| HCL | 4 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| can i know the source code for reversing a linked list with
out using a temporary variable?
| Honeywell | 3 |
| How the C program can be compiled? | HP | 6 |
| How can I call a function, given its name as a string? | ABC-Telecom | 1 |
| What is structure padding & expalain wid example
what is bit wise structure? | | 1 |
| implement general tree using link list | Wipro | 1 |
| hello friends
what do u mean by BUS ERROR
i got this error while i am doing my program in DATA STRUCTURES | Wipro | 2 |
| How can I make a program in c to print 'Hello' without
using semicolon in the code? | C-DAC | 3 |
| difference between my-strcpy and strcpy ? | Geometric-Software | 3 |
| what is the difference between declaration ,defenetion and
initialization of a variable? | LG-Soft | 4 |
| what is object oriental programing? | | 1 |
| if a person is buying coconuts of Rs10,and then sell that
coconuts of Rs9,with the loss of one rupee.After that the
person became a millaniore.how? | Wipro | 5 |
| |
| For more C Interview Questions Click Here |