| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What do you mean by team?? | | 2 |
| who did come first hen or agg | Infosys | 12 |
| Write a program to compute the following
1!+2!+...n! | | 3 |
| #include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
| Oracle | 13 |
| write a programe returns the number of times the character
appears in the string | | 1 |
| What are Storage Classes in C ? | HP | 15 |
| What will be result of the following program?
void myalloc(char *x, int n)
{
x= (char *)malloc(n*sizeof(char));
memset(x,\0,n*sizeof(char));
}
main()
{
char *g="String";
myalloc(g,20);
strcpy(g,"Oldstring");
printf("The string is %s",g);
}
a) The string is : String
b) Run time error/Core dump
c) The string is : Oldstring
d) Syntax error during compilation
e) None of these
| IBM | 3 |
| What is the difference between static and global variables? | | 1 |
| 2. Counting in Lojban, an artificial language developed
over the last fourty years, is easier than in most languages
The numbers from zero to nine are:
0 no
1 pa
2 re
3 ci
4 vo
5 mk
6 xa
7 ze
8 bi
9 so
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
numbers.
| Nagarro | 2 |
| What is the difference between typeof(foo) and myFoo.GetType()? | | 1 |
| what is the output of the following program and explain the
answer
#include<stdio.h>
exp()
{
main(5)
}
main(int a)
{
printf("%d",a);
return;
} | Satyam | 3 |
| what is the differance between pass by reference and pass
by value. | Infosys | 4 |
| can we access one file to one directory? | | 1 |
| f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
| Hughes | 6 |
| Find Error if any in below code, Justify ur answer:
struct xx
{
int a;
struct yy
{
char c;
struct xx* p;
}
struct yy* q;
} | NDS | 3 |
| what is the difference between #include<> and #include”…”? | | 1 |
| what is the defrenece between structure and union | | 5 |
| HOW CAN ADD OUR FUNCTION IN LIBRARY. | | 5 |
| How to receive strings with spaces in scanf() | | 4 |
| where does malloc() function get the memory? | | 1 |
| |
| For more C Interview Questions Click Here |