| Other C Code Interview Questions |
| |
| Question |
Asked @ |
Answers |
| |
| write a c program to Create a mail account by taking the
username, password, confirm password, secret_question,
secret_answer and phone number. Allow users to register,
login and reset password(based on secret question). Display
the user accounts and their details . |
| 1 |
| how to swap 3 nos without using temporary variable |
Satyam | 4 |
| main()
{
static char
names[5][20]={"pascal","ada","cobol","fortran","perl"};
int i;
char *t;
t=names[3];
names[3]=names[4];
names[4]=t;
for (i=0;i<=4;i++)
printf("%s",names[i]);
} |
| 2 |
| #include<stdio.h>
main()
{
char s[]={'a','b','c','\n','c','\0'};
char *p,*str,*str1;
p=&s[3];
str=p;
str1=s;
printf("%d",++*p + ++*str1-32);
} |
| 1 |
| enum colors {BLACK,BLUE,GREEN}
main()
{
printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);
} |
| 2 |
| #ifdef something
int some=0;
#endif
main()
{
int thing = 0;
printf("%d %d\n", some ,thing);
} |
| 1 |
| main( )
{
int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}};
printf(“%u %u %u %d \n”,a,*a,**a,***a);
printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1);
} |
| 1 |
| What is the output of the program given below
main()
{
signed char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
} |
| 1 |
| main()
{
int i=10;
void pascal f(int,int,int);
f(i++,i++,i++);
printf(" %d",i);
}
void pascal f(integer :i,integer:j,integer :k)
{
write(i,j,k);
} |
| 1 |
| Find the largest number in a binary tree |
Infosys | 7 |
| Program to Delete an element from a doubly linked list.
|
Infosys | 4 |
| Write a function to find the depth of a binary tree. |
Adobe | 13 |
| |
| For more C Code Interview Questions Click Here |
|