| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| main is a predefined or user define function
if user defined why?
if predefined whay? | TCS | 2 |
| when will be evaluated as true/
if(x==x==x)
a) x=1;
b) x=0;
c) x=-1;
d) none | HCL | 4 |
| Which command is more efficient?
*(ptr+1) or ptr[1] | | 3 |
| How does free() know how many bytes to free? | | 5 |
| will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); | | 2 |
| main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
what is the output? | Ramco | 7 |
| what is mallloc()?how it works? | Excel | 3 |
| let's take a code
struct FAQ
{
int a;
char b;
float c;
double d;
int a[10];
}*temp;
now explain me how the memory will be allocated for the
structure FAQ and what address will be in the structure
pointer (temp).................... | | 7 |
| 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 |
| Write a C Programm..
we press 'a' , it shows the albhabetical number is 1, if we
press 'g' it shows the answer 7.. any can help me | | 4 |
| Given an unsigned integer, find if the number is power of 2? | | 4 |
| int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?
| Mascot | 9 |
| write a program to generate 1st n fibonacci prime number | | 5 |
| wats the diference btwen constant pointer and pointer to a
constant.pls give examples. | | 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 | 2 |
| what r callback function? | | 1 |
| what is the difference b/w compiler and debugger? | Assurgent | 1 |
| What is the Difference between Class and Struct? | Motorola | 9 |
| Sir i want e-notes of C languge of BAlaguruswami book i.e
scanned or pdf file of balaguruswamy book on c
language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com
| | 4 |
| How many types of linked lists what are they?
How many types of data structures? | BSNL | 5 |
| |
| For more C Interview Questions Click Here |