| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Given an array of characters, how would you reverse it? How
would you reverse it without using indexing in the array? | | 1 |
| what is the maximum no. of bytes calloc can allocate | Mphasis | 2 |
| Unsigned char c;
for ( c=0;c!=256;c++2)
printf("%d",c);
No. of times the loop is executed ?
| Mascot | 3 |
| how to generate sparse matrix in c | | 1 |
| Write one statement equalent to the following two statements
x=sqr(a);
return(x);
Choose from one of the alternatives
a.return(sqr(a));
b.printf("sqr(a)");
c.return(a*a*a);
d.printf("%d",sqr(a));
| TCS | 4 |
| C passes By value or By reference? | Geometric-Software | 5 |
| difference between function & structure | Verizon | 5 |
| how to print a statement in c without use of console
statement ,with the help of if statement it should print
| Satyam | 2 |
| How can I prevent other programmers from violating
encapsulation by seeing the private parts of my class? | | 1 |
| 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 |
| Convert the following expression to postfix and prefix
(A+B) * (D-C) | Satyam | 2 |
| 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 | 4 |
| what is meant by c | | 4 |
| Read N characters in to an array . Use functions to do all
problems and pass the address of array to function.
1. Print only the alphabets . If in upper case print in
lower case vice versa. | | 1 |
| i want to job in your company, so how it will be possible. | TCS | 2 |
| what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
| Motorola | 1 |
| the number 138 is called well ordered number because the
three digits in the number (1,3,8) increase from left to right
(1<3<8). the number 365 is not well ordered coz 6 is larger
than 5.
write a program that wull find and display all possible
three digit well ordered numbers.
sample:
123,124,125,126,127,128,129,134
,135,136,137,138,139,145,146,147
148
149,156.......789 | | 3 |
| write a 'c' program to sum the number of integer values | | 5 |
| write the program for prime numbers? | TCS | 10 |
| Program to trim a given character from a string. | NetApp | 4 |
| |
| For more C Interview Questions Click Here |