A - B. C. D .: Answer: Option C Explanation
A - B. C. D .: Answer: Option C Explanation
14 by
2.1 ?
A
rem = 3.14 % 2.1;
.
B.rem = modf(3.14, 2.1);
C.rem = fmod(3.14, 2.1);
D
Remainder cannot be obtain in floating point division.
.
C
#include <stdio.h>
#include <math.h>
int main ()
{
printf ("fmod of 3.14/2.1 is %lf\n", fmod (3.14,2.1) );
return 0;
}
Output:
fmod of 3.14/2.1 is 1.040000
#include<stdio.h>
#include<math.h>
int main()
{
printf("\n Result : %f" , ceil(1.66) );
return 0;
}
1 : extern int x;
2 : float square ( float x ) { ... }
3 : double pow(double, double);
A
1 B.2
.
C.1 and 3 D.3
C
10. In the following program where is the variable a getting defined and where it is getting
declared?
#include<stdio.h>
int main()
{
extern int a;
printf("%d\n", a);
return 0;
}
int a=20;
A.extern int a is declaration, int a = 20 is the definition
B.int a = 20 is declaration, extern int a is the definition
C.int a = 20 is definition, a is not defined
D.a is declared, a is not defined
A
1. The keyword used to transfer control from a function back to the calling function is
A
switch B.goto
.
C.go back D.return
D
int main()
{
int a = 4, b = 3, c;
c = add(a, b);
printf("c = %d\n", c);
return 0;
}
int add(int a, int b)
{
/* returns the value and control back to main() function */
return (a+b);
}
Output:
c=7
2. int f(a, b)
int a; float b;
{
/* Some code */
}
A 1. KR Notation 1. Pre ANSI C Notation
B.
. 2. ANSI Notation 2. KR Notation
1. ANSI Notation 1. ANSI Notation
C. D.
2. KR Notation 2. Pre ANSI Notation
C
int main()
{
printf("IndiaBIX");
main();
return 0;
}
A
Infinite times B.32767 times
.
C.65535 times D.Till stack doesn't overflow
D