| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work? | | 6 |
| 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 |
| write a c program to check weather a particluar bit is set
or not? | IBM | 4 |
| #define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
what are the outputs? | Ramco | 4 |
| what is the difference between entry control and exit
control statement? | | 2 |
| Write a program to exchange two variaables without temp | Geometric-Software | 6 |
| what is the function of void main()? | | 6 |
| WRITE A PROGRAM TO FIND A REVERSE OF TWO NO | | 5 |
| #include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Tell me the output? | Ramco | 5 |
| a.One Cannot Take the address of a Bit Field
b.bit fields cannot be arrayed
c.Bit-Fields are machine Dependant
d.Bit-fields cannot be declared as static
Which of the Following Statements are true w.r.t Bit-Fields
A)a,b&c B)Only a & b C)Only c D)All
| Accenture | 2 |
| Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc | | 2 |
| Write a c code segment using a for loop that calculates and
prints the sum of the even integers from 2 to 30, inclusive? | | 2 |
| hi how to convert program from notepad to turboc editor can
u please help me | | 1 |
| YBJBU6 | | 1 |
| compute the nth mumber in the fibonacci sequence? | TCS | 7 |
| who will call your main function in c under linux? | | 2 |
| what is a far pointer | TCS | 9 |
| 2. Counting in Lojban, an artificial language developed
over the last fourty years, is easier than in most languages
The numbers from zero to nine are:
0 no
1 pa
2 re
3 ci
4 vo
5 mk
6 xa
7 ze
8 bi
9 so
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
numbers.
| Nagarro | 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 |
| prototype of sine function. | Cadence | 2 |
| |
| For more C Interview Questions Click Here |