| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| If we give two names then this displays the connection
between the two people. It is nothing but flames game | | 1 |
| How the C program can be compiled? | HP | 7 |
| write a C program to print the program itself ?! | TCS | 11 |
| Function to find the given number is a power of 2 or not? | Motorola | 12 |
| a memory of 20 bytes is allocated to a string declared as
char *s then the following two statements are executed:
s="Etrance"
l=strlen(s);
what is the value of l ?
a.20
b.8
c.9
d.21
| TCS | 4 |
| How can I implement opaque (abstract) data types in C?
What's the difference between these two declarations?
struct x1 { ... };
typedef struct { ... } x2;
| | 2 |
| Write a program to generate prime factors of a given integer? | | 3 |
| program for comparing 2 strings without strcmp() | | 3 |
| What's wrong with "char *p = malloc(10);" ? | | 4 |
| I have an array of 100 elements. Each element contains some
text. i want to:
append a star character to the end of every fifth element
remove every second character from every tenth element,
and…
add a line feed (ascii 10) after the 30th character of
every array element whose length is greater than 30
characters. | | 1 |
| #ifdef TRUE
int I=0;
#endif
main()
{
int j=0;
printf("%d %d\n",i,j);
}
| ADITI | 2 |
| what is compiler | | 5 |
| what are the languages used in c#? | Infosys | 1 |
| What are volatile variables? | | 1 |
| what is data structure
| | 4 |
| write a program for even numbers? | | 8 |
| what is the output of the following program?
main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
} | | 7 |
| which of the following statements is incorrect
a.typedef struct new{
int n1;
char n2;
} DATA;
b.typedef struct {
int n3;
char *n4;
}ICE;
c.typedef union {
int n5;
float n6;
} UDT;
d.#typedef union {
int n7;
float n8;
} TUDAT;
| TCS | 5 |
| what is call by value and call by reference | | 2 |
| Print the foll in C...eg when n=5 the o/p must b
+ +
+ + + +
+ + + + +
+ + + +
+ + | | 1 |
| |
| For more C Interview Questions Click Here |