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 13:58:09 wrote,

nice site

rinku panigrahi on 2010-07-05 21: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 18:03:38 wrote,

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

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

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

sunil behera on 2010-11-28 01:49:40 wrote,

heartly like to this side

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

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

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

The answer of first question is File OPened.

Kaushik Sen on 2011-04-06 04:18:43 wrote,

nice test

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

q18 also wrong

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

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

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

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

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

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

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

80% confused with 12

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

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

om prakash jha on 2011-08-15 00:09:57 wrote,

best collection

rajesh kurna on 2011-08-17 04:13:17 wrote,

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

Tanaji Bhadke on 2011-08-18 09: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 10:14:59 wrote,

quest 18 is wrong

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

Qst 18 is wrong

kiran bobade on 2011-09-11 07: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 21:04:09 wrote,

most of the question are wrong

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

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

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

thanks

prashant khandelwal on 2011-11-11 18: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 10:58:38 wrote,

nice:-)

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

nice...

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

it is good...

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

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

dinesh reddy on 2012-05-14 04:01:06 wrote,

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

arvind garg on 2012-05-25 04:36:31 wrote,

If anyone wanna improve C skills please join open source system group on facebook.

vishal srivastava on 2012-05-27 09:20:21 wrote,

the ans of question is absolutely wrong i think writer mistyped the question
ans of question 19 is also wrong struct keyword is not required

Joanse nithin riju on 2012-06-04 11:07:39 wrote,

nice

.

shailesh suthar on 2012-06-05 15:04:45 wrote,

superb ...

atul vishwakarma on 2012-10-19 18:30:16 wrote,

most of the questions are easy. the uploader should increase the level of difficulty !!

Mohan Kumar on 2012-11-04 06:30:41 wrote,

Can anyone please clarify me the doubt in this question :
"Question 12 :

Which of the following denote valid variable names in C?

Option A: exforsys

Option B: float

Option C: abcd

Option D: None of the Above

Your Answer: C

Correct Answer: B".

My doubt is, "Either The answer may be A or C, because B is a keyword and both A & C are valid file names". But here it shows B is correct. My mail id : mohankrtgode@yahoo.com

navajeevan gondi on 2013-05-14 03:22:57 wrote,

its nice

navajeevan gondi on 2013-05-14 03:24:56 wrote,

who got 1st place in this test mention it, for me 85%

sudhakar yadav on 2013-05-26 19:50:05 wrote,

got 90% correct..

ram narayan on 2013-06-12 09:18:03 wrote,

Can anyone please clarify me the doubt in this question :
"Question 12 :

Which of the following denote valid variable names in C?

Option A: exforsys

Option B: float

Option C: abcd

Option D: None of the Above

Your Answer: C

Correct Answer: B".

My doubt is, "Either The answer may be A or C, because B is a keyword and both A & C are valid file names". But here it shows B is correct. My mail id : ramnarayan.godara@yahoo.com

Parthiban B on 2013-08-06 10:00:22 wrote,

Question:12 Doubt

Anjani Singh on 2013-11-07 06:27:30 wrote,

eor 12th ans will be a or c.not b because float is a keyword. it cant be used as variable name.