| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| how do u find out the number of 1's in the binary
representation of a decimal number without converting it
into binary(i mean without dividing by 2 and finding out
the remainder)? three lines of c code s there it
seems...can anyone help | | 2 |
| Write a program to write a given string in maximum
possibilities?
i.e str[5]="reddy";
i.e we can write this string in 120 ways
for that write a program | Subex | 3 |
| what is c?
| Tech-Mahindra | 5 |
| 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 | 3 |
| how to find a 5th bit is set in c program | IBM | 3 |
| fun(int x)
{
if(x > 0)
fun(x/2);
printf("%d", x);
}
above function is called as:
fun(10);
what will it print?
} | NDS | 13 |
| How do I declare an array of N pointers to functions
returning pointers to functions returning pointers
to characters?
| | 1 |
| Implement a function that returns the 5th element from the
end in a singly linked list of integers in one pass. | Microsoft | 6 |
| enum colors {BLACK,BLUE,GREEN}
main()
{
printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);
}
| ME | 3 |
| How to use c/c++ code in JAVA | Satyam | 7 |
| how to find out the inorder successor of a node in a tree?? | TCS | 2 |
| main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
| CitiGroup | 4 |
| Write code for atoi(x) where x is hexadecimal string. | Adobe | 2 |
| write a program to arrange the contents of a 1D array in
ascending order | | 3 |
| write a program structure to find average of given number | | 1 |
| which one is highest Priority in c?
a)=,b)+,c)++,d)== | | 3 |
| main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
what is the output? | Ramco | 4 |
| What are .h files and what should I put in them? | | 3 |
| 7. Identify the correct argument for the function call
fflush() in ANSI C:
A)stdout
B)stdin
C)stderr
D)All the above
| Accenture | 8 |
| hi how to convert program from notepad to turboc editor can
u please help me | | 1 |
| |
| For more C Interview Questions Click Here |