Subscribe this Blog

Enter your email address:

Delivered by FeedBurner

Followers

Monday, May 7, 2012

UGC NET Preparation : Programming Languages


 

Q. Which of the following special symbol allowed in a variable?

A. * (asterisk)
B. | (pipeline)
C. - (hyphen)
D. _ (underscore)


Q.How would you round off a value from 1.66 to 2.0?

A. ceil(1.66) 
B. floor(1.66)
C. roundup(1.66) 
D. roundto(1.66)


Q.Which of the definition is correct?

A. int length; 
B. char int;
C. int long; 
D. float double;

Q. What is the output of the program given below ?

#include
 int main() 
 enum status { pass, fail, atkt}; 
 enum status stud1, stud2, stud3; 
 stud1 = pass; 
 stud2 = atkt; stud3 = fail;
 printf("%d, %d, %d\n", stud1, stud2, stud3);
 return 0; 
}

A. 0, 1, 2
B. 1, 2, 3
C. 0, 2, 1 
D. 1, 3, 2

Q. C is a?

(a) 
high level language 
(b) low level language
(c) 
high level language with some low level features.
(d) low level language with some high level features.

Q. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?

(a. The element will be set to 0.
(b. 
The compiler would report an error.
(c. The program may crash if some important data gets overwritten.
(d. The array size would appropriately grow.



No comments:

Total Pageviews

Disclaimer : Blog Policies

This blog publishes various general knowledge. errors and omissions expected. The Knowledge documents in this blog meant only to increase the general awareness of the readers. If any of the information available on this blog violates or infringes any of your copyright protection, leave a comment . This blog makes no representations as to accuracy, completeness, correctness or validity of any information on this site and will not be liable for any errors, or delays in this information. The information contained in this blog is subject to change without notice. You may use contents in this blog only for personal use. Reproduction and republishing of any contents from here to any other websites or blogs is strictly prohibited.