| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the output of the following program?
#include<stdio.h>
void main()
{
float x=1.1;
while(x==1.1)
{
printf("\n%f",x);
x=x-0.1;
}
} | | 4 |
| write a program for size of a data type without using
sizeof() operator? | | 7 |
| What is the output for the program given below
typedef enum grade{GOOD,BAD,WORST,}BAD;
main()
{
BAD g1;
g1=1;
printf("%d",g1);
}
| ADITI | 3 |
| what is the use of call back function in c?tell me with
example | | 1 |
| what is the benefit of c30 | | 1 |
| whether itis a structured language? | Microsoft | 1 |
| How can I read a directory in a C program? | Wipro | 1 |
| code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3 | | 3 |
| what is the output of the following program?
#include<stdio.h>
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("\n%d %d %d",x,y,z);
} | | 10 |
| what is link list?
| | 2 |
| find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
| TCS | 4 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| what will the following program do?
void main()
{
int i;
char a[]="String";
char *p="New Sring";
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p);
//Line no:9//
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p);
free(a);
}
//Line no 15//
a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1
| IBM | 1 |
| program for validity of triangle from 3 side | | 6 |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 2 |
| How can I find out how much memory is available? | Persistent | 1 |
| how do u find out the number of 1's in the binary
representation of a decimal number without converting it
into binary(i mean without dividing by 2 and finding out
the remainder)? three lines of c code s there it
seems...can anyone help | | 2 |
| what are the general concepts of c and c++ | | 1 |
| two variables are added answer is stored on not for third
variable how it is possible? | | 3 |
| main()
{
clrscr();
}
clrscr();
| ME | 3 |
| |
| For more C Interview Questions Click Here |