| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| program to find middle element of linklist? | Huawei | 1 |
| c programming of binary addition of two binary numbers
| | 1 |
| If "AaBbCc" is passed to the char
char x(*a)
{
a[0]?x(a+1):1;
printf("%c",a[0]);
return 1;
}
what will be the output?
| Hughes | 5 |
| can anyone proide me reading material on
svit00ef27@yahoo.com please thanx in advance
| IBM | 1 |
| main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
what is the output?
| Ramco | 4 |
| write the function int countchtr(char string[],int
ch);which returns the number of timesthe character ch
appears in the string. for example the call countchtr("she
lives in Newyork",'e') would return 3. | | 4 |
| char S;
char S[6]= " HELLO";
printf("%s ",S[6]);
output of the above program ?
(0, ASCII 0, I,unpredictable)
| Mascot | 6 |
| what is the difference between structural,object
based,object orientd programming languages? | PanTerra | 1 |
| Here is alphabets : abcdefgh
1) how to reverse. as hgfedcba
2) after reversal, how to group them in a pair hg fe dc ba.
| | 2 |
| Why data types in all programming languages have some range?
Why ritche have disigned first time likethat?Why not a
single data type can support all other types? | Excel | 1 |
| 2.Given the short c program that follows
a. make a list of the memory variables in this program
b.which lines of code contain operations that change the
contents of memory? what are those operations?
Void main( void)
{
Double base;
Double height;
Double area;
Printf(“enter base and height of triangle :”);
Scanf(“%lg”, &base);
Scanf(“%lg”, &height);
Area=base*height/2.0;
Printf(“the area of the triangle is %g \n”,area);
}
| Wipro | 1 |
| what is a headerfile?and what will be a program without it
explain nan example? | Assurgent | 5 |
| Write a program to compute the following
1!+2!+...n! | | 3 |
| How can I convert integers to binary or hexadecimal? | | 2 |
| a memory of 20 bytes is allocated to a string declared as
char *s then the following two statements are executed:
s="Etrance"
l=strlen(s);
what is the value of l ?
a.20
b.8
c.9
d.21
| TCS | 4 |
| when will be evaluated as true/
if(x==x==x)
a) x=1;
b) x=0;
c) x=-1;
d) none | HCL | 4 |
| related to rdbms query . | | 1 |
| WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE
GIVEN VALUES | | 1 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| Function to find the given number is a power of 2 or not? | Motorola | 12 |
| |
| For more C Interview Questions Click Here |