| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is the real difference between arrays and pointers? | | 5 |
| Write a programme to find even numbers without using any
conditional statement? | Infosys | 3 |
| Write a program to exchange two variaables without temp | Geometric-Software | 5 |
| write a program for size of a data type without using
sizeof() operator? | | 6 |
| Write a program to compare two strings without using the
strcmp() function | Accenture | 6 |
| How would you write qsort? | | 1 |
| What will be result of the following program?
void myalloc(char *x, int n)
{
x= (char *)malloc(n*sizeof(char));
memset(x,\0,n*sizeof(char));
}
main()
{
char *g="String";
myalloc(g,20);
strcpy(g,"Oldstring");
printf("The string is %s",g);
}
a) The string is : String
b) Run time error/Core dump
c) The string is : Oldstring
d) Syntax error during compilation
e) None of these
| IBM | 2 |
| Find Index of least significant bit set in an Integer. ex.
int value is say 10001000 results should be 4. | | 1 |
| 15.what is the disadvantage of using macros?
16.what is the self-referential structure?
17.can a union be self-referenced?
18.What is a pointer?
19.What is the Lvalue and Rvalue?
20.what is the difference between these initializations?
21.Char a[]=”string”;
22.Char *p=”literal”;
23.Does *p++ increment p, or what it points to? | | 1 |
| write a fuction for accepting and replacing lowercase
letter to'Z' with out using inline function. | Temenos | 3 |
| What ios diff. Between %e & %f? | Honeywell | 1 |
| wap in c to accept a number display the total count of digit | | 4 |
| what is volatile in c language? | TCS | 1 |
| how to find out the reverse number of a digit if it is
input through the keyboard? | | 1 |
| what is a far pointer | TCS | 8 |
| what about "char *(*(*a[])())();"
| Oracle | 2 |
| main()
{
printf(5+"Vidyarthi Computers");
} | | 5 |
| Is the C language is the portable language...If yes...Then
Why...and if not then what is problem so it is not a
Portable language..??? | TCS | 1 |
| YBJBU6 | | 1 |
| how many times of error occur in C | | 7 |
| |
| For more C Interview Questions Click Here |