| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what about "char *(*(*a[])())();"
| Oracle | 2 |
| if a five digit number is input through the keyboard, write
a program to calculate the sum of its digits.
(hint:-use the modulus operator.'%') | | 14 |
| Write a program in c to input a 5 digit number and print it
in words. | | 3 |
| How to avoid structure padding in C? | Tech-Mahindra | 5 |
| write a program to find the frequency of a number | | 1 |
| Design a program using an array that searches a number if it
is found on the list of the given input numbers and locate
its exact location in the list. | | 4 |
| What's wrong with "char *p = malloc(10);" ? | | 4 |
| write a “Hello World” program in “c” without using a semicolon? | CTS | 6 |
| parkside's triangle..
create a program like this..
enter the size: 6
enter the seed: 1
output:
1
23
456
7891
23456
789123
sample2:
enter the size: 5
enter the seed: 3
output:
3
45
678
9123
45678
parkside should not exceed 10 while its seed should only be
not more than 9.. | | 4 |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 5 |
| write a c program for print your name .but,your name may be small
letter mean print a capital letter or your name may be capital
letter mean print a small letter .example
\\enter ur name :
sankar
The name is: SANKAR
(or)
enter your name:SAnkar
The name is:saNKAR | IBM | 2 |
| main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
} | | 3 |
| why TCS selected more student in the software field from
all institution. | TCS | 4 |
| consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none
| TCS | 5 |
| What is the difference between null pointer and the void
pointer? | | 2 |
| What will be printed as the result of the operation below:
#include<..>
int x;
int modifyvalue()
{
return(x+=10);
}
int changevalue(int x)
{
return(x+=1);
}
void main()
{
int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%d\n",x);
x++;
changevalue(x);
printf("Second output:%d\n",x);
modifyvalue();
printf("Third output:%d\n",x);
} | | 2 |
| Give a fast way to multiply a number by 7 | Microsoft | 12 |
| What is the difference between null pointer and void pointer | CTS | 4 |
| 5. What kind of sorting is this:
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1
2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;
3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort
| Accenture | 2 |
| what is data structure? | CBSE | 4 |
| |
| For more C Interview Questions Click Here |