-
Function syntax
string abc = showData()["Hello"];
can somebody explain what is use of ["Hello"] after function call? -
Reverse String Stored in Pointer Array
Write a C program to reverse the strings stored in the following array of pointers to strings char *s[]={"To err is human..", "But to really mess things up", "One needs to learn C!!" };
-
-
-
-
-
What is the output of the following program:
cint main()
{
char a = 120, b = 140;
int i;
i = a + b;
printf("%d", i);
return 0;
}
a) 260
b) 0
c) -1
d) 1 -
-
What is the output of the following sample C Code
Int *ptr = (int *)malloc(100*(sizeof(int)));ptr++;free(ptr);
-
What is page thrashing?
Some operating systems (such as UNIX or Windows in enhanced mode) use virtual memory. Virtual memory is a technique for making a machine behave as if it had more memory than it really has, by using disk space to simulate RAM (random-access memory). In the 80386 and higher Intel CPU chips, and in most other modern microprocessors (such as the Motorola 68030, Sparc, and Power PC), exists a piece of...
-
-
-
-
-
-
-
-
What will be output if you will execute following c code?
c #i ain()
{
float p=1,q=2,r=-2,a;
a=avg(p,(q=4,r=-12,q),r);
printf("%f",a); return 0;
}
float avg(float x,float y,float z)
{
return (x+y+z)/3;
}
a) 1.000000
b) 0.333333
c) -2.333333
d) 1 -
-
Whats the output of.....>>?
#include
#include
void main()
{
int a=1;
if(a=1,3,5,6)
printf("good&a=%d",a);
else
printf("bad&a=%d",a);
}
}
C Interview Questions
Ans