| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 |
| what is the difference between
const char *p, char const *p, const char* const p
| Accenture | 4 |
| 10. Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 4 |
| Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
| Mascot | 4 |
| write a program to compare 2 numbers without using logical
operators? | IBM | 1 |
| char ch=10;printf("%d",ch);what is the output | Accenture | 11 |
| how to find out the reverse number of a digit if it is
input through the keyboard? | | 2 |
| write a function for strtok()?? | Verifone | 1 |
| will u give me old quesrion papers for aptitude for L & t
info tech? | L&T | 1 |
|
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output?? | Ramco | 13 |
| write a c program to find biggest of 3 number without
relational operator? | Wipro | 2 |
| DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? | Wipro | 1 |
| Hi,
main()
{
}
Is a user defined function or Built in Functionn | Honeywell | 9 |
| what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ?? | | 4 |
| What is the result
main()
{
char c=-64;
int i=-32
unsigned int u =-16;
if(c>i){
printf("pass1,");
if(c<u)
printf("pass2");
else
printf("Fail2");}
else
printf("Fail1);
if(i<u)
printf("pass2");
else
printf("Fail2")
}
a)Pass1,Pass2
b)Pass1,Fail2
c)Fail1,Pass2
d)Fail1,Fail2
e)none
| IBM | 7 |
| 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 |
| what is difference b/w extern & volatile variable?? | Teleca | 2 |
| 2)#include<iostream.h>
main()
{
printf("Hello World");
}
the program prints Hello World without changing main() the
o/p should
be
intialisation
Hello World
Desruct
the changes should be
a)iostream operator<<(iostream os, char*s)
os<<'intialisation'<<(Hello World)<<Destruct
b) c) d)none of the above | Siemens | 4 |
| what does the following function print?
func(int i)
{
if(i%2)return 0;
eale return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);}
| TCS | 8 |
| |
| For more C Interview Questions Click Here |