-
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 -
-
-
-
-
-
-
-
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 is the output of the following sample C Code
Int *ptr = (int *)malloc(100*(sizeof(int)));ptr++;free(ptr);
-
-
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 -
-
-
-
-
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!!" };
-
Function syntax
string abc = showData()["Hello"];
can somebody explain what is use of ["Hello"] after function call? -
C program to count numbers of positive and negative numbers
Write a C program using arrays to count the numbers of positive and negative numbers which accepts the inputs as "size of the array" & "elements of the array" and outputs as "number of negative numbers in an array are" & "numbers of positive numbers in an array are" ?
Print number of distinct characters in a string.
How do I implement a C program that reads a string and prints a table with the number of occurrences of each character in the string.
Ex: Rubber. r = 2, u = 1, b = 2, e = 1.

It looks like you are using an AD Blocker!
Please Turn OFF your ad blocker
- OR -
LOGIN to continue using GeekInterview website.
Ans