| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| which types of data structure will i use to convert infix to
post fix??? | IIT | 3 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| what is memory leak?
| | 3 |
| C program to find frequency of each character in a text
file? | | 3 |
| WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE? | IBM | 5 |
| 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? | | 6 |
| difference between semaphores and mutex? | | 1 |
| Difference between fopen() and open()? | Aricent | 3 |
| 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 |
| Can we write a program without main() function? | | 9 |
| write a program to generate 1st n fibonacci prime number | | 5 |
| main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
what is the output?
| Ramco | 4 |
| What is encapsulation? | | 1 |
| what is the first address that gets stored in stack
according to a C or C++ compiler???? or what will be the
first address that gets stored when we write a C source
code???????? | Apple | 2 |
| a=0;
while(a<5)
printf("%d\n",a++);
how many times does the loop occurs?
a.infinite
b.5
c.4
d.6
| TCS | 5 |
| What is #pragma directive?how it is used in the program?
what is its advantages and disadvantages? | | 1 |
| writw a program to insert an element in the begning of a
doubly linked list | | 1 |
| Give the output for the following program.
#define STYLE1 char
main()
{
typedef char STYLE2;
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %d\n",x,y);
}
| ADITI | 1 |
| how can i get output like this?
1
2 3
4 5 6 | Excel | 3 |
| What ios diff. Between %e & %f? | Honeywell | 1 |
| |
| For more C Interview Questions Click Here |