| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| how to display 2-D array elements in spiral | | 1 |
| how to find a 5th bit is set in c program | IBM | 3 |
| What is the difference between null pointer and void pointer | CTS | 3 |
| Why data types in all programming languages have some range?
Why ritche have disigned first time likethat?Why not a
single data type can support all other types? | Excel | 1 |
| a C prog to swap 2 no.s without using variables just an
array? | TCS | 4 |
| what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
} | | 3 |
| which types of data structure will i use to convert infix to
post fix??? | IIT | 3 |
| what is the stackpointer | | 2 |
| what is self refrential structure | HCL | 2 |
| write a c program to accept a given integer value and print
its value in words | | 3 |
| what is pointer | TCS | 1 |
| why java is called as a purely oops language. | | 2 |
| how to find out the biggest element (or any other
operation) in an array which is dynamic. User need not to
mention the array size while executing. | | 2 |
| 1. Write a c pgm to print 1 to 100 without using loops.
2. Write a c pgm for leap year
3. Write a c pgm fibbonacci series,factorial
4. Write a c pgm count no of lines , blanks, tabs in a
para(File concept)
5. Write a c pgm to print the letter as per given condition
i.e.. if u give 4
out put should b
4 4 4 4
4 4 4 4
4 4 4 4
4 4 4 4
6.how do get the o/p in number from 1 to 100 in the screen
without using control statement?
7. who do u print the word "hello world" without using
"printf" statement?
8. write sql program to get the detail of student in a
class?
Definitions:
structure
union
arrays
linkedlist
macros
directives
difference b/w
pre processorsDiffrence:
1.Constructors and destructors
2.Structure and Union
3.Array and Lists
4.pre processor...
5. Privillages in C++
6.structure and union
7.break and continue
8.while and dowhile Pgm.. | | 1 |
| Average of a couple 10 years ago was 25. The average
remains same after having a child and twins after 3 years.
What is the present age of the first child | IBM | 9 |
| write an algorithm to get a sentence and reverse it in the
following format:
input : I am here
opuput: Here Am I
note: first letter of every word is capiatlised | | 2 |
| 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 |
| 1.what are local and global variables?
2.what is the scope of static variables?
3.what is the difference between static and global variables?
4.what are volatile variables?
5.what is the use of 'auto' keyword?
6.how do we make a global variable accessible across files?
Explain the extern keyword?
7.what is a function prototype?
8.what does keyword 'extern' mean in a function declaration?
| | 1 |
| why division operator not work in case of float constant? | | 1 |
| |
| For more C Interview Questions Click Here |