| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output? | Ramco | 6 |
| 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 |
| what is dangling pointer? | LG-Soft | 1 |
| what is the difference between #include<stdio.h> and
#include"stdio.h" ? | TCS | 4 |
| what is a static function | Satyam | 9 |
| what is the use of call back function in c?tell me with
example | | 1 |
| What is the output for the following program
#include<stdio.h>
main()
{
char a[5][5],flag;
a[0][0]='A';
flag=((a==*a)&&(*a==a[0]));
printf("%d\n",flag);
}
| ADITI | 3 |
| 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 |
| fun(int x)
{
if(x > 0)
fun(x/2);
printf("%d", x);
}
above function is called as:
fun(10);
what will it print?
} | NDS | 12 |
| write a program for size of a data type without using
sizeof() operator? | | 6 |
| How the C program can be compiled? | HP | 6 |
| 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's wrong with "char *p; *p = malloc(10);"? | | 5 |
| what is the use of pointers | | 4 |
| How to add two numbers without using arithmetic operators? | Sapient | 7 |
| How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance | US-Technology | 5 |
| what is a far pointer | TCS | 8 |
| what are the difference between ANSI C and Let Us c and Turbo C | | 1 |
| How many types of linked lists what are they?
How many types of data structures? | | 3 |
| How can I read a directory in a C program? | | 1 |
| |
| For more C Interview Questions Click Here |