| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| int a=1,b=2,c=3;
printf("%d,%d",a,b,c);
What is the output?
| Verifone | 14 |
| write a c program to check weather a particluar bit is set
or not? | IBM | 4 |
| what will be the result of the following program ?
char *gxxx()
{
static char xxx[1024];
return xxx;
}
main()
{
char *g="string";
strcpy(gxxx(),g);
g = gxxx();
strcpy(g,"oldstring");
printf("The string is :
%s",gxxx());
}
a) The string is : string
b) The string is :Oldstring
c) Run time error/Core dump
d) Syntax error during compilation
e) None of these
| IBM | 2 |
| Write a program that accepts a string where multiple spaces
are given in between the words. Print the string ignoring
the multiple spaces.
Example:
Input: “ We.....Are....Student “ Note: one .=1 Space
Output: "We Are Student" | IBM | 4 |
| print ur name without using any semicolon in c/c++.... | | 6 |
| char S;
char S[6]= " HELLO";
printf("%s ",S[6]);
output of the above program ?
(0, ASCII 0, I,unpredictable)
| Mascot | 6 |
| int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i);
| HCL | 5 |
| What is Heap? | | 3 |
| What are volatile variables? | | 1 |
| post new interiew question and aptitude test papers | | 1 |
| how does the for loop work actually..suppose for the
following program how it ll work plz explain to me
for(i=5;i>=0;i--)
prinf(i--); | RMSI | 16 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| 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 |
| WHY DO WE USE A TERMINATOR IN C LANGUAGE? | | 2 |
| 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 |
| Who had beaten up hooligan "CHAKULI" in his early college days? | | 1 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| Determine if a number is a power of 2 at O(1). | | 1 |
| what is self refrential structure | HCL | 2 |
| How would you write qsort? | | 1 |
| |
| For more C Interview Questions Click Here |