| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How can I prevent other programmers from violating
encapsulation by seeing the private parts of my class? | | 1 |
| Write a C program that reads a series of strings and prints
only those ending in "ed" | | 2 |
| what information does the header files contain? | BSNL | 5 |
| Write a program to find the given number is odd or even
without using any loops(if,for,do,while) | | 2 |
| what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ?? | | 4 |
| What is the memory allocated by the following definition ?
int (*x)[10];
| ADITI | 3 |
| how memory store byte
| Huawei | 3 |
| 2)#include<iostream.h>
main()
{
printf("Hello World");
}
the program prints Hello World without changing main() the
o/p should
be
intialisation
Hello World
Desruct
the changes should be
a)iostream operator<<(iostream os, char*s)
os<<'intialisation'<<(Hello World)<<Destruct
b) c) d)none of the above | Siemens | 4 |
| main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
| CitiGroup | 7 |
| macros and function are related in what aspect?
a)recursion b)varying no of arguments
c)hypochecking d)type declaration
| HCL | 8 |
| Program to find the absolute value of given integer using
Conditional Operators | N-Tech | 2 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| How to convert a binary number to Hexa decimal number??
(Note:Do not convert it into binary and to Hexadecimal) | Subex | 1 |
| how to find the binary of a number? | Infosys | 5 |
| What is true about the following
C Functions
a.Need not return any value
b.Should always return an integer
c.Should always return a float
d.Should always return more than one value.
| TCS | 7 |
| helllo sir ,
what is the main use of the pointer ,array ,and the
structure with the example of a programe | | 2 |
| Who is invented by c? | Infosys | 14 |
| What is structure packing ? | HP | 1 |
| 1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision | Qualcomm | 6 |
| write a program to print sum of each row of a 2D array.
| | 2 |
| |
| For more C Interview Questions Click Here |