<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/402/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Planet+cs</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/402/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Planet+cs"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/Special:Contributions/Planet_cs"/>
	<updated>2026-04-17T23:34:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Quiz_developer_docs&amp;diff=96421</id>
		<title>Quiz developer docs</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Quiz_developer_docs&amp;diff=96421"/>
		<updated>2012-03-13T06:36:12Z</updated>

		<summary type="html">&lt;p&gt;Planet cs: Created page with &amp;quot;Which of the following output should be used to obtain a remainder after dividing 3.14 by 2.1 ? A) rem= modf(3.14,2.1); B) rem =fmod(3.14,2.1); C) rem=3.14%2.1; D) Remainder cann...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Which of the following output should be used to obtain a remainder after dividing 3.14 by 2.1 ?&lt;br /&gt;
A) rem= modf(3.14,2.1);&lt;br /&gt;
B) rem =fmod(3.14,2.1);&lt;br /&gt;
C) rem=3.14%2.1;&lt;br /&gt;
D) Remainder cannot be obtain in floating point division.&lt;br /&gt;
ANSWER: C&lt;br /&gt;
&lt;br /&gt;
What are the type of linkages?&lt;br /&gt;
A) External and None&lt;br /&gt;
B) Internal&lt;br /&gt;
C) Internal and External &lt;br /&gt;
D) External,Internal and None&lt;br /&gt;
ANSWER: D&lt;br /&gt;
&lt;br /&gt;
Which of the following special symbol allowed in a variable name?&lt;br /&gt;
A) * (asterisk)&lt;br /&gt;
B) - (hyphen)&lt;br /&gt;
C) _ (underscore)&lt;br /&gt;
D) | (pipeline)&lt;br /&gt;
ANSWER: C&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4 Is there any difference between following these declarations ?&lt;br /&gt;
1. extern int fun();&lt;br /&gt;
2. int fun();&lt;br /&gt;
A) No difference, except extern int fun(); is probably in another file&lt;br /&gt;
B) Both are identical &lt;br /&gt;
C) int fun(); is overrided with extern int fun();&lt;br /&gt;
D) None of these&lt;br /&gt;
ANSWER: A&lt;br /&gt;
&lt;br /&gt;
5  How would you round off a value from 1.66 to 2.0?&lt;br /&gt;
A) ceil(1.66)&lt;br /&gt;
B) floor(1.66)&lt;br /&gt;
C) roundup(1.66)&lt;br /&gt;
D) roundto(1.66)&lt;br /&gt;
&lt;br /&gt;
ANSWER: A&lt;br /&gt;
&lt;br /&gt;
6.  &lt;br /&gt;
By default a real number is treated as a&lt;br /&gt;
A) float&lt;br /&gt;
B) double&lt;br /&gt;
C) long double&lt;br /&gt;
D) far double&lt;br /&gt;
&lt;br /&gt;
ANSWER: B&lt;br /&gt;
&lt;br /&gt;
7.  &lt;br /&gt;
Which of the following is not user defined data type? &lt;br /&gt;
1 :&lt;br /&gt;
struct book&lt;br /&gt;
{&lt;br /&gt;
    char name[10];&lt;br /&gt;
    float price;&lt;br /&gt;
    int pages;&lt;br /&gt;
};&lt;br /&gt;
2 :&lt;br /&gt;
long int l = 2.35;&lt;br /&gt;
3 :&lt;br /&gt;
enum day {Sun, Mon, Tue, Wed};&lt;br /&gt;
A) 1&lt;br /&gt;
B) 2&lt;br /&gt;
C) 3&lt;br /&gt;
D) Both 1 and 2&lt;br /&gt;
ANSWER:  B&lt;br /&gt;
&lt;br /&gt;
Is the following statement a declaration or definition?&lt;br /&gt;
extern int i;&lt;br /&gt;
A) Declaration&lt;br /&gt;
B) Definition&lt;br /&gt;
C) Function&lt;br /&gt;
D) Error&lt;br /&gt;
ANSWER: A&lt;br /&gt;
&lt;br /&gt;
9.  &lt;br /&gt;
Identify which of the following are declarations &lt;br /&gt;
1 :&lt;br /&gt;
extern int x;&lt;br /&gt;
2 :&lt;br /&gt;
float square ( float x ) { ... }&lt;br /&gt;
3 :&lt;br /&gt;
double pow(double, double);&lt;br /&gt;
A) 1&lt;br /&gt;
B) 2&lt;br /&gt;
C) 1 and 3&lt;br /&gt;
D) 3&lt;br /&gt;
ANSWER: C&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10.  &lt;br /&gt;
In the following program where is the variable a getting defined and where it is getting declared? &lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    extern int a;&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, a);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
int a=20;&lt;br /&gt;
A) extern int a is declaration, int a = 20 is the definition&lt;br /&gt;
B) int a = 20 is declaration, extern int a is the definition&lt;br /&gt;
C) int a = 20 is definition, a is not defined&lt;br /&gt;
D) a is declared, a is not defined&lt;br /&gt;
ANSWER: A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11.  &lt;br /&gt;
When we mention the prototype of a function?&lt;br /&gt;
A)  Defining&lt;br /&gt;
B) Declaring&lt;br /&gt;
C) Prototyping&lt;br /&gt;
D) Calling&lt;br /&gt;
ANSWER: B&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12.  &lt;br /&gt;
What is the output of the program given below ? &lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    enum status { pass, fail, atkt};&lt;br /&gt;
    enum status stud1, stud2, stud3;&lt;br /&gt;
    stud1 = pass;&lt;br /&gt;
    stud2 = atkt;&lt;br /&gt;
    stud3 = fail;&lt;br /&gt;
    printf(&amp;quot;%d, %d, %d\n&amp;quot;, stud1, stud2, stud3);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
A) 0, 1, 2&lt;br /&gt;
B) 1, 2, 3&lt;br /&gt;
C) 0, 2, 1&lt;br /&gt;
D) 1, 3, 2&lt;br /&gt;
ANSWER: C&lt;br /&gt;
&lt;br /&gt;
13.  &lt;br /&gt;
What will be the output of the program in 16 bit platform (Turbo C under DOS)? &lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    extern int i;&lt;br /&gt;
    i = 20;&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, sizeof(i));&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
A) 2&lt;br /&gt;
B) 4&lt;br /&gt;
C) vary from compiler&lt;br /&gt;
D) Linker Error : Undefined symbol &#039;i&#039;&lt;br /&gt;
ANSWER: D&lt;br /&gt;
&lt;br /&gt;
14.  &lt;br /&gt;
What is the output of the program? &lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    extern int a;&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, a);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
int a=20;&lt;br /&gt;
A) 20&lt;br /&gt;
B) 0&lt;br /&gt;
C) Garbage Value&lt;br /&gt;
D) Error&lt;br /&gt;
ANSWER: A&lt;br /&gt;
&lt;br /&gt;
15.  &lt;br /&gt;
What is the output of the program in Turbo C (in DOS 16-bit OS)? &lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char *s1;&lt;br /&gt;
    char far *s2;&lt;br /&gt;
    char huge *s3;&lt;br /&gt;
    printf(&amp;quot;%d, %d, %d\n&amp;quot;, sizeof(s1), sizeof(s2), sizeof(s3));&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
A) 2, 4, 6&lt;br /&gt;
B) 4, 4, 2&lt;br /&gt;
C) 2, 4, 4&lt;br /&gt;
D) 2, 2, 2&lt;br /&gt;
ANSWER: C&lt;/div&gt;</summary>
		<author><name>Planet cs</name></author>
	</entry>
</feed>