| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is the meaning When we write "#include" what is # and
what does include does there??? | HCL | 11 |
| Which of the following about automatic variables within a
function is correct ?
a.its type must be declared before using the variable
b.they are local
c.they are not initialised to zero
d.they are global.
| TCS | 3 |
| printf("%d",(printf("Hello")); What it returns?
| TCS | 23 |
| What is difference between the following 2 lines
.
int temp = (int)(0x00);
int temp = (0x00int);
| Bosch | 3 |
| Given an unsigned integer, find if the number is power of 2? | | 4 |
| convert 12345 to 54321 withoutusing strig | | 3 |
| find second largest element in array w/o using sorting
techniques? use onle one for loop. | Zycus-Infotech | 2 |
| write a program to sort the elements in a given array in c
language | | 2 |
| main()
{
int i,j,A;
for(A=-1;A<=1;A++)
prinf("%d\t",!!A);
} | | 5 |
| main is a predefined or user define function
if user defined why?
if predefined whay? | TCS | 2 |
| Concat two string with most overlapped substring has to
remove "abcd"+ "cdef" = "abcdef | | 5 |
| What's a "sequence point"? | | 2 |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| Given an array of characters which form a sentence of
words, give an efficient algorithm to reverse the order of
the words (not characters) in it? | | 3 |
| suppose we use switch statement and we intilize years name
using enum statement like(jan,feb,mar,------dec) we take
integer value as an input .question is that the month which
we analyz is from 0 to 11 bt if i enter 12 than how he
again starts from begning and print jan | | 1 |
| Which of the following is not a valid declaration for main
()?
1) int main()
2) int main(int argc, char *argv[])
3) They both work
| | 2 |
| Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program
| TCS | 12 |
| how to print a statement in c without use of console
statement ,with the help of if statement it should print
| Satyam | 2 |
| write an algorithm to get a sentence and reverse it in the
following format:
input : I am here
opuput: Here Am I
note: first letter of every word is capiatlised | | 2 |
| |
| For more C Interview Questions Click Here |