| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a C++ program without using any loop (if, for, while
etc) to print numbers from 1 to 100 and 100 to 1;
| | 7 |
| what is volatile in c language? | TCS | 1 |
| main is a predefined or user define function
if user defined why?
if predefined whay? | TCS | 2 |
| 10. Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 4 |
| What is the real difference between arrays and pointers? | | 11 |
| WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS | | 4 |
| what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
| Motorola | 1 |
| Would you rather wait for the results of a quicksort, a
linear search, or a bubble sort on a 200000 element array?
1) Quicksort
2) Linear Search
3) Bubble Sort
| | 2 |
| find a number whether it is even or odd without using any
control structures and relational operators? | Microsoft | 14 |
| program for comparing 2 strings without strcmp() | | 3 |
| c programming of binary addition of two binary numbers
| | 1 |
| write a program for odd numbers? | | 6 |
| Hi,
main()
{
}
Is a user defined function or Built in Functionn | Honeywell | 9 |
| how many error occurs in C language ? | Wipro | 11 |
| what is object oriental programing? | | 1 |
| how to find the size of the data type like int,float
without using the sizeof operator? | | 7 |
| palindrome for strings and numbers----Can anybody do the
prog? | TCS | 6 |
| what is the output?
#define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t)
float gfloat;
main()
{
float a=1.12,b=3.14;
fun (a,b,float);
printf("na=%4.2f,b=%4.2f",a,b);
}
A)Error in Defining Macro
B)a=1.12,b=3.14
C)a=3.14,b=1.12
D)None of the Above
| Accenture | 2 |
| How to swap two values using a single variable ?
condition: Not to use Array and Pointer ? | | 4 |
| User define function contain thier own address or not. | | 2 |
| |
| For more C Interview Questions Click Here |