0% found this document useful (0 votes)
33 views

Assignment Computer Programming

Uploaded by

raghu1985.blr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Assignment Computer Programming

Uploaded by

raghu1985.blr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Mangalayatan University, Aligarh

Faculty of Engineering & Technology


Assignment
Class/Course-M. Tech-COMPUTER
SCIENCE-Sem-II-Computer
Programming

SubjectCode-WCSL-
6203
SubjectName- Compute
r Programming
Note:-All the answers have to be writteninthe assignment copies providedandto be
submittedinthe University.

Section-A
Note:-This section contains 10 multiple choice questionsand all the questions are compulsory. All questions
carry equal marks. There will be no negative marking.

Que.1. Who is the father of C language?


a) Steve Jobs
b) James Gosling
c) Dennis Ritchie
d) Rasmus Lerdorf
Que.2. Which of the following is not a valid C variable name?
a) int number;
b) float rate;
c) int variable_count;
d) int $main;
Que.3. All keywords in C are in ____________
a) LowerCase letters
b) UpperCase letters
c) CamelCase letters
d) None of the mentioned
Que.4. Which of the following is true for variable names in C?
a) They can contain alphanumeric characters as well as special characters
b) It is not an error to declare a variable to be one of the keywords(like goto, static)
c) Variable names cannot start with a digit
d) Variable can be of any length
Que.5. Which is valid C expression?
a) int my_num = 100,000;
b) int my_num = 100000;
c) int my num = 1000;
d) int $my_num = 10000;
Que.6. Which of the following cannot be a variable name in C?
a) volatile
b) true
c) friend
d) export
Que.7. What is short int in C programming?
a) The basic data type of C
b) Qualifier
c) Short is the qualifier and int is the basic data type
d) All of the mentioned
Que.8. Which of the following declaration is not supported by C language?
a) String str;
b) char *str;
c) float str = 3e2;
d) Both “String str;” and “float str = 3e2;”
Que.9. Which keyword is used to prevent any changes in the variable within a C program?
a) immutable
b) mutable
c) const
d) volatile
Que.10. What is the result of logical or relational expression in C?
a) True or False
b) 0 or 1
c) 0 if an expression is false and any positive number if an expression is true
d) None of the mentioned

Section-B
Note:-This section contains 6 descriptive questionsout of which 5 questions needs to be attempted. It should
be answered within 100-200 words.

Que 11. Explain different types of computer.

Que 12. What is Software? Explain different types of software.

Que 13. With a neat diagram explain the basic structure of a computer

Que 14. Explain a general structure of C program with an example.

Que 15. What is a token? What are different types of tokens available in C language? Explain.

Que 16. Evaluate the following expressions:

i) 22 + 3 < 6 && !5 || 22 = =7 && 22 – 2 > +5

ii) a + 2 > b || !c && a = = d *a – 2 < = e Where a=11, b=6, c=0, d= 7 and e=5

Section-C
Note:-This section contains 4descriptive questions out of which 2 questions needs to be attempted. It should
be answered within 250-300 words.

Que 17. Explain the different types of loops in C with syntax.


Que 18. Show how break and continue statements are used in a C-program, with example.
Que 19. Develop a C program to generate and plot the Pascal triangle.
Que 20. What is an array? How a single dimension and two dimension arrays are declared and initialized?

You might also like