| Other C Code Interview Questions |
| | | Question | Asked @ | Answers | | | | Given an array of characters which form a sentence of words,
give an efficient algorithm to reverse the order of the words
(not characters) in it. | Wipro | 2 | | void main()
{
char far *farther,*farthest;
printf("%d..%d",sizeof(farther),sizeof(farthest));
} | | 1 | | main(int argc, char **argv)
{
printf("enter the character");
getchar();
sum(argv[1],argv[2]);
}
sum(num1,num2)
int num1,num2;
{
return num1+num2;
} | | 1 | | main()
{
int i;
printf("%d",scanf("%d",&i)); // value 10 is given as
input here
} | | 1 | | How do I write a program to print proper subset of given
string . Eg :input: abc
output:{},{a},{b},{c},{a,b},{a,c},{b,c},
{a,b,c}.I desperately need this program please mail me to
saravana6m@gmail.com | Deshaw | 9 | | What are segment and offset addresses? | Infosys | 1 | | How do you sort a Linked List (singly connected) in O(n)
please mail to pawan.10k@gmail.com if u can find an
anser...i m desperate to knw... | Oracle | 3 | | 1
o 1
1 0 1
0 1 0 1
1 0 1 0 1
how to design this function format in c-language ? | | 1 | | How we print the table of 3 using for loop in c
programing? | | 3 | | main()
{
char *p="hai friends",*p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s %s",p,p1);
} | | 1 | | char *someFun1()
{
char temp[ ] = string";
return temp;
}
char *someFun2()
{
char temp[ ] = {s, t,r,i,n,g};
return temp;
}
int main()
{
puts(someFun1());
puts(someFun2());
} | | 1 | | main()
{
41printf("%p",main);
}8 | | 1 | | void main()
{
int i=i++,j=j++,k=k++;
printf(%d%d%d,i,j,k);
} | | 1 | | #include <stdio.h>
main()
{
char * str = "hello";
char * ptr = str;
char least = 127;
while (*ptr++)
least = (*ptr<least ) ?*ptr :least;
printf("%d",least);
} | | 1 | | char inputString[100] = {0};
To get string input from the keyboard which one of the
following is better?
1) gets(inputString)
2) fgets(inputString, sizeof(inputString), fp) | | 1 | | main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
} | | 1 | | main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}
a. 2, 2
b. 2, 100
c. 4, 100
d. 4, 4 | HCL | 3 | | main()
{
int i, n;
char *x = girl;
n = strlen(x);
*x = x[n];
for(i=0; i<n; ++i)
{
printf(%s\n,x);
x++;
}
} | | 1 | | main()
{
main();
} | | 1 | | void main()
{
char ch;
for(ch=0;ch<=127;ch++)
printf(%c %d \n, ch, ch);
} | | 1 | | | | For more C Code Interview Questions Click Here |
|