| Other C Code Interview Questions |
| |
| Question |
Asked @ |
Answers |
| |
| how can u draw a rectangle in C |
Wipro | 53 |
| int i,j;
for(i=0;i<=10;i++)
{
j+=5;
assert(i<5);
} |
Cisco | 3 |
| #define int char
main()
{
int i=65;
printf("sizeof(i)=%d",sizeof(i));
} |
| 1 |
| write a c program to Create employee record by taking
details like name, employee id, address and phone number.
While taking the phone number, take either landline or
mobile number. Ensure that the phone numbers of the employee
are unique. Also display all the details |
Tcs | 2 |
| What are the following notations of defining functions known as?
i. int abc(int a,float b)
{
/* some code */
}
ii. int abc(a,b)
int a; float b;
{
/* some code*/
} |
| 1 |
| main()
{
char c=' ',x,convert(z);
getc(c);
if((c>='a') && (c<='z'))
x=convert(c);
printf("%c",x);
}
convert(z)
{
return z-32;
} |
| 1 |
| #define clrscr() 100
main()
{
clrscr();
printf("%d\n",clrscr());
} |
| 2 |
| Write a program to print a square of size 5 by using the
character S. |
Microsoft | 5 |
| Printf can be implemented by using __________ list. |
| 3 |
| #include<stdio.h>
main()
{
int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} };
int *p,*q;
p=&a[2][2][2];
*q=***a;
printf("%d..%d",*p,*q);
} |
| 1 |
| Write a program to implement the motion of a bouncing ball
using a downward gravitational force and a ground-plane
friction force. Initially the ball is to be projected in to
space with a given velocity vector |
| 2 |
| char *someFun()
{
char *temp = “string constant";
return temp;
}
int main()
{
puts(someFun());
} |
| 1 |
| |
| For more C Code Interview Questions Click Here |