| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| which one of follwoing will read a character from keyboard
and store in c
a)c=getc()
b)c=getchar()
c)c=getchar(stdin)
d)getc(&c)
e)none | | 5 |
| Give a fast way to multiply a number by 7 | Microsoft | 8 |
| difference of two no's with out using - operator | | 6 |
| how to find turn around time in operating system? | | 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 |
| how to convert binary to decimal and decimal to binary in C
lanaguage | | 4 |
| What's the best way to declare and define global variables? | | 5 |
| To what value do nonglobal variables default?
1) auto
2) register
3) static
| | 4 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
| TCS | 4 |
| for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer???? | | 6 |
| How would you sort a linked list? | | 1 |
| can we print any string in c language without using
semicolon(;)(terminator) in whole program. | | 6 |
| what is the use of fflush() function? | | 1 |
| 44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion? | | 3 |
| DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? | Wipro | 1 |
| print the following using nested for loop.
5 4 3 2 1
1 2 3 4
3 2 1
1 2
1
2 1
1 2 3
4 3 2 1
1 2 3 4 5 | | 5 |
|
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output?? | Ramco | 13 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| 34.what are bitwise shift operators?
35.what are bit fields? What is the use of bit fields in a
structure declaration?
36.what is the size of an integer variable?
37.what are the files which are automatically opened when a
c file is executed?
38.what is the little endian and big endian?
39.what is the use of fflush() function?
40.what is the difference between exit() and _exit() functions?
41.where does malloc() function get the memory?
42.what is the difference between malloc() and calloc()
function?
43.what is the difference between postfix and prefix unary
increment operators? | | 2 |
| |
| For more C Interview Questions Click Here |