| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a c code segment using a for loop that calculates and
prints the sum of the even integers from 2 to 30, inclusive? | | 2 |
| write a own function to compare two strings with out using
stringcomparition function? | LG-Soft | 3 |
| in C-programming language without using printf statement
can we get output r not ? if yes how and if no also how ?
| | 6 |
| wite a programme in c to linear search a data using flag and
without using flags? | TCS | 3 |
| what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
| Motorola | 1 |
| #include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Tell me the output? | Ramco | 5 |
| write a program in 'c' to find the value of p[i+1]^n.p,i,n
are arguments of a macro and n is a integer | | 1 |
| main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
| CitiGroup | 4 |
| which one is not preprocessor directive
a)#if b)#elif c)#undef d)#pragma
| Wipro | 13 |
| 44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion? | | 3 |
| code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3 | | 3 |
| what is the first address that gets stored in stack
according to a C or C++ compiler???? or what will be the
first address that gets stored when we write a C source
code???????? | Apple | 2 |
| Program to display given 3 integers in ascending order | N-Tech | 1 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| How can I make a program in c to print 'Hello' without
using semicolon in the code? | C-DAC | 5 |
| what is the difference between <stdio.h> and "stdio.h" | Kanbay | 5 |
| how to copy a string without using c function | | 5 |
| Print the foll in C...eg when n=5 the o/p must b
+ +
+ + + +
+ + + + +
+ + + +
+ + | | 1 |
| why TCS selected more student in the software field from
all institution. | TCS | 3 |
| write program on arrays
| GE | 2 |
| |
| For more C Interview Questions Click Here |