C Language for Programming online Test

Are the following two declarations same? char far *far*scr; char far far ** scr ;
True
False
Can we pass a variable argument list to a function at run-time?
True
False
Can a structure contains a pointer to itself
True
False
Is it necessary that size of all elements in a union should be same?
True
False
Since enumerations have integral type and enumeration constants are of type int can we freely intermix them with other integral types, without errors?
True
False
Can we have an array of bit fields?
True
False
In the following code #include main( ) { FILE *fp ; fp = fopen ( "trial", "r" ) ; } fp points to
A structure which contains a char pointer which points to the first character in the file
The name of the file
The first character in the file
None of the above
If a file contains the line "I am a boy\r\n" then on reading this line into the array str using fgets() what would str contain?
"I am a boy\r\0"
"I am a boy\n\0"
"I am a boy"
"I am a boy\r\n\0"
To print out a and b given below, which printf() statement would use? float a = 3.14; double b = 3.14;
printf ( “%f %f”, a, b) ;
printf ( “%Lf %f”, a, b) ;
printf ( “%Lf %Lf”, a, b) ;
printf ( “%f %Lf”, a, b ) ;
What does the following program do? main( ) { unsigned int num ; int i ; scanf ("%u", &num) ; for (i=0;i<16;i++) printf(“%d",(num< It prints all odd bits from num
It prints binary equivalent of num.
It prints all even bits from num.
None of the above
/
Error
e
d
abcdefgh

Are the three declarations char **apple, char *orange[ ], and char cherry[ ][ ] same?
True
False
The preprocessor can trap simple errors like missing declarations, nested comments or mismatch of braces
True
False
To tackle a double in printf() we can use %f, whereas in scanf() we should use %lf.
True
False
The binary equivalent of 5.375 is
101.011
101.101 1 10111
101011
None of the above
Description:

This is another test on C Language for improving the aptitude in Computer Programming Language
Disclaimer: Content, such as images used in the questions (if any), have been picked up from various places for the sole purpose of Instruction.

Comments
hereamitenters
By: hereamitenters
1336 days 1 hours 50 minutes ago

THANXXX TO SHOW MY IMAGE......

Rakesh
By: Rakesh
1249 days 5 hours 9 minutes ago

Its really good ques to be asked in adobe / google like companies

ramya
By: ramya
1229 days 3 hours 15 minutes ago

its really helping us

Your Name
By: Your Name
1219 days 6 hours 18 minutes ago

helping us

gvsriram murthy
By: gvsriram murthy
1216 days 9 hours 2 minutes ago

sreeram - this is good,,we need to work on this....

gvsriram murthy
By: gvsriram murthy
1216 days 9 hours 1 minutes ago

good

navaj
By: navaj
1205 days 6 hours 33 minutes ago

good, but i have to improve my knowledge. it is very useful site to gain different ideas.

Patel Umang
By: Patel Umang
1198 days 2 hours 34 minutes ago

not so hard

NIHAR SHARMA
By: NIHAR SHARMA
1167 days 14 hours 1 minutes ago

AMAZING

raj
By: raj
1158 days 13 hours 48 minutes ago

liked.....

SiddharthA
By: SiddharthA
1055 days 21 hours 48 minutes ago

what will be out put of this pro? WHY?WHY?WHY?????
void main()
{
int a=5;
int b=5;
clrscr();
b= b b;
printf("%d\n",b);
a=a b--;
printf("%d",a,b) ;
getch();
}

SiddharthA
By: srinivas
1044 days 6 hours 2 minutes ago

may be the values are a and b are 0's because u use clrscr after definig a and b.........

SiddharthA
By: Ankit Jain
1040 days 7 hours 49 minutes ago

hi srinivas,
the clrscr only clears the console.

SiddharthA
By: mukesh sahu
982 days 1 hours 31 minutes ago

error

Manoj Kumar
By: Manoj Kumar
1054 days 10 hours 59 minutes ago

can anybody tell me the answer of question which was

main()
{
unsigned int num;
int i;
scanf("%d",

muslim
By: muslim
1044 days 11 hours 27 minutes ago

good and interesting questions

shyamala
By: shyamala
1038 days 7 hours 11 minutes ago

hi..this test is intresting.we can learn more..

shyamala
By: shyamala
1038 days 7 hours 10 minutes ago

hi siddarthA..
is the output 25 and 20 ??

Anurag Sharma
By: Anurag Sharma
1031 days 10 hours 49 minutes ago

first of all correct sentence means b=b*b and a=a*b--;
then op will be 25 n 125. bcz u have written post decrement form, means avalue of be is firs assigned so a=5*125

Anurag Sharma
By: Anurag Sharma
1031 days 5 hours 33 minutes ago

sry in previous comment i have written wrong explanation

first of all correct sentence means b=b*b and a=a*b--;
then op will be 125 n 24. bcz u have written post decrement form, means value of b is first assigned so a=25*25

Anurag Sharma
By: Anurag Sharma
1031 days 5 hours 22 minutes ago

what would be the op and WHYYYYYYYYYYY

void main()
{
char far *a,*b;
printf("%d%d",sizeof(a),sizeof(b));
getch();
}

Anurag Sharma
By: mukesh sahu
982 days 1 hours 29 minutes ago

2 2 (all pointer variables are integer type

Anurag Sharma
By: vidya
976 days 1 hours 40 minutes ago

ans s 4,2 since char ptr takes 2 bytes of memory n far pointer occupies 4 bytes of mem

Anurag Sharma
By: vinayak
271 days 6 hours 13 minutes ago

4 2

pranshu
By: pranshu
1022 days 10 hours 55 minutes ago

Why we use getch() funtion in C lanuage..?

pranshu
By: anusha
793 days 8 hours ago

to get immediate answr when compiled

swapnil kshirsagar
By: swapnil kshirsagar
981 days 3 hours 11 minutes ago

thanxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx a lot

Ranjit
By: Ranjit
958 days 5 hours 19 minutes ago

Thank you ...Its very good for me to improve my c knowledge

surendra
By: surendra
951 days 23 hours 22 minutes ago

Answer to Question 2 "can we pass a variable argument list to a function at run time ?" is given as false. But it should be true because this is how printf is implemented.

int printf(const char *format, ...)

surendra
By: bmko
908 days 7 hours 3 minutes ago

I guess command line arguments also falls under that category

eswar
By: eswar
910 days 11 hours 41 minutes ago

its nice

anusha
By: anusha
793 days 7 hours 57 minutes ago

really good one...
after this test i came to know my knowledge in c lang

roshani aeshal
By: roshani aeshal
687 days 4 hours 16 minutes ago

its so gooood because its self test

roshani aeshal
By: roshani aeshal
687 days 4 hours 13 minutes ago

its also prepation for examination

sid
By: sid
676 days 3 hours 4 minutes ago

whats this average score......???...

Lakshmi priya
By: Lakshmi priya
620 days 5 hours 51 minutes ago

sent the certificate for me to my mail

Want to learn?

Sign up and browse through relevant courses.

or fill this simple form
Name:
Your Email:
Password:
Country:
Contact no.:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as shown in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy

Your Facebook Friends on WizIQ

More Tests By Author

ASP Server Controls
10 Questions | 419 Attempts

ASP.NET, Namespaces ASP.NET
10 Questions | 1454 Attempts

An ASP.NET Application
10 Questions | 284 Attempts

Test your basic knowledge on DATASTRUCTURES, STACK
10 Questions | 953 Attempts

Connect