Basics Of C Language:Test 2 - Online Test

Test Difficulty Level: Medium

Syllabus of Test

C language: Questions based on the Basic of C Language.

Sample Question from this online test:

Question: What will be the output of this program?
#include <stdio.h>
main()
{
FILE *fi;
fi=fopen("exforsys.C","r");
if(fi=NULL)
{
puts("File not opened");
exit(1);
}
puts("FILE opened")
}

Option A: No output

Option B: FILE opened

Option C: File not opened

Option D: Error

To answer, click the "Start This Test" button below.

Start this Test






Comments

supreet kaur on 2009-09-10 08:58:09 wrote,

nice site

rinku panigrahi on 2010-07-05 16:22:40 wrote,

c is case sensitive language. so question no 12 will not give any error. as it is in capital letter.

Rajesh Kumar Gupta on 2010-07-07 13:03:38 wrote,

@rinku,
the problem has been rectified ... thnkx for the suggestion.

abhishek chaturvedi on 2010-08-01 16:02:04 wrote,

check q12.........it iz wrong.....

sunil behera on 2010-11-27 19:49:40 wrote,

heartly like to this side

paramjit singla on 2011-02-02 06:21:35 wrote,

float is not a variable name..q 12 is wrong

shan mugam on 2011-02-04 02:45:57 wrote,

The answer of first question is File OPened.

Kaushik Sen on 2011-04-05 23:18:43 wrote,

nice test

suresh vuchuru on 2011-05-24 13:41:39 wrote,

q18 also wrong

Arun Kumar on 2011-07-01 06:15:17 wrote,

i will be good try.........

nikita arora on 2011-07-07 12:03:50 wrote,

float is keyword..........

nikita arora on 2011-07-07 12:08:54 wrote,

q19.....typedef is used then D should be correct

vinita gaikwad on 2011-08-03 10:06:00 wrote,

80% confused with 12

niraj hiranwar on 2011-08-10 04:20:59 wrote,

time put to good use .....:)

om prakash jha on 2011-08-14 19:09:57 wrote,

best collection

rajesh kurna on 2011-08-16 23:13:17 wrote,

nice........................thank u

Tanaji Bhadke on 2011-08-18 04:10:20 wrote,

in q.12 float is wrong ans coz it is a keyword in c, we can put Float then it vl b right,

ashlesha kulkarni on 2011-08-18 05:14:59 wrote,

quest 18 is wrong

swapna khemalapure on 2011-09-06 10:35:04 wrote,

Qst 18 is wrong

kiran bobade on 2011-09-11 02:21:43 wrote,

The answer for Q.12 is both option a and c, but float is a keyword for datatype so how it can be a valid variable name.

For Q.20 Answer C is correct Getche() is also another function which also holds a character but does not print it on the screen

please checkout these two questions and replay if am wrong

satchit nisanka on 2011-09-25 16:04:09 wrote,

most of the question are wrong

satchit nisanka on 2011-09-25 16:05:06 wrote,

q-12 must be wiz are not a valid variable name

Thani S on 2011-09-29 05:37:54 wrote,

thanks

prashant khandelwal on 2011-11-11 12:21:39 wrote,

its gud..........
i like it and surely it would help the student in their future........thnks to site developer........

nammi s on 2012-01-03 04:58:38 wrote,

nice:-)

shinky jalhotra on 2012-01-19 07:53:51 wrote,

nice...

Varadha Reddy Koneru on 2012-02-02 23:26:37 wrote,

it is good...

SHIVAM DUBEY on 2012-02-15 00:34:53 wrote,

i think ques1 will give the output..???
and it should be c part.

dinesh reddy on 2012-05-13 23:01:06 wrote,

i think first question gives output. Plz give me explanation!!