| Other C Interview Questions |
| |
| Question |
Asked @ |
Answers |
| |
| study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above |
Accenture | 15 |
| what are threads ? why they are called light weight
processes ? what is the relation between process and threads ? |
| 1 |
| will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); |
| 3 |
| we all know about the function overloading concept used in
C++ and we all learnt abt that.... but that concept is
already came in C in a very smaller propotion ... my
question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION
OVERLOADING IS USED in C language????????????? |
Google | 4 |
| In the below code, how do you modify the value 'a' and print
in the function. You'll be allowed to add code only inside
the called function.
main()
{
int a=5;
function(); // no parameters should be passed
}
function()
{
/* add code here to modify the value of and print here */
} |
| 1 |
| why arithmetic operation can’t be performed on a void pointer? |
| 1 |
| wat are the two methods for swapping two numbers without
using temp variable?? |
| 2 |
| write a programe returns the number of times the character
appears in the string |
| 2 |
| write a program to interchange the value between two variable
without using loop |
| 1 |
| how to return 1000 variables from functio9n in c?plz give me
code also |
| 6 |
| macros and function are related in what aspect?
a)recursion b)varying no of arguments
c)hypochecking d)type declaration
|
HCL | 11 |
| what is the difference between definition and declaration?
give me some examples. |
TCS | 2 |
| |
| For more C Interview Questions Click Here |