| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 6. Which of the Following is not defined in string.h?
A)strspn()
B)strerror()
C)memchr()
D)strod()
| Accenture | 1 |
| The C language terminator is
a.semicolon
b.colon
c.period
d.exclamation mark
| TCS | 3 |
| write a programme that inputs a number by user and gives
its multiplication table. | | 2 |
| 11. Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 7 |
| implement general tree using link list | Wipro | 1 |
| What is the difference between typeof(foo) and myFoo.GetType()? | | 1 |
| what is link list?
| | 2 |
| What is the purpose of Scanf Print, getchar, putchar,
function? | | 2 |
| what is the output?
#define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t)
float gfloat;
main()
{
float a=1.12,b=3.14;
fun (a,b,float);
printf("na=%4.2f,b=%4.2f",a,b);
}
A)Error in Defining Macro
B)a=1.12,b=3.14
C)a=3.14,b=1.12
D)None of the Above
| Accenture | 2 |
| Given an array of characters, how would you reverse it? How
would you reverse it without using indexing in the array? | | 1 |
| how to copy a string without using c function | | 5 |
| write a program that finds the factorial of a number using
recursion? | | 1 |
| can we print any string without using terminator? | Infosys | 2 |
| #define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
int i = 10, j = 5, k = 0;
k = MAX(i++, ++j);
printf("%d %d %d", i,j,k);
}
what will the values of i , j and k?
}
| NDS | 9 |
| How do I declare a pointer to an array? | | 5 |
| Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program
| TCS | 12 |
| In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory? | | 4 |
| to find out the reverse digit of a given number | Infosys | 5 |
| please give me answer with details
#include<stdio.h>
main()
{
int i=1;
i=(++i)*(++i)*(++i);
printf("%d",i);
getch();
} | | 3 |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| |
| For more C Interview Questions Click Here |