QUESTION BANK: INTRODUCTION TO PROGRAMMING (HCS102) a. Compare and contrast unboxing and widening using code snippets [10]

Similar documents
Introduce C# as Object Oriented programming language. Explain, tokens,

Introduction to Programming Using Java (98-388)

CS313D: ADVANCED PROGRAMMING LANGUAGE

C-LANGUAGE CURRICULAM

More Programming Constructs -- Introduction

5/23/2015. Core Java Syllabus. VikRam ShaRma

C # Language Specification

Operators and Expressions

.Net Technologies. Components of.net Framework

Introduction to C++ Introduction. Structure of a C++ Program. Structure of a C++ Program. C++ widely-used general-purpose programming language

Introduction to C++ with content from

C#: framework overview and in-the-small features

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

1/16/2013. Program Structure. Language Basics. Selection/Iteration Statements. Useful Java Classes. Text/File Input and Output.

Module 2 - Part 2 DATA TYPES AND EXPRESSIONS 1/15/19 CSE 1321 MODULE 2 1

Object-Oriented Programming in C# (VS 2015)

Object-Oriented Programming in C# (VS 2012)

X Language Definition

Java Notes. 10th ICSE. Saravanan Ganesh

Lecture 3 Tao Wang 1

What goes inside when you declare a variable?

C# Programming: From Problem Analysis to Program Design. Fourth Edition

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Question And Answer.


Introduction to C# Applications

Introduction To C#.NET

Computer Programming, I. Laboratory Manual. Experiment #3. Selections

4. Inputting data or messages to a function is called passing data to the function.

Prerequisites: The student should have programming experience in a high-level language. ITCourseware, LLC Page 1. Object-Oriented Programming in C#

C# MOCK TEST C# MOCK TEST I

Course Syllabus C # Course Title. Who should attend? Course Description

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class.

St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

Preview from Notesale.co.uk Page 3 of 36

CAMBRIDGE SCHOOL, NOIDA ASSIGNMENT 1, TOPIC: C++ PROGRAMMING CLASS VIII, COMPUTER SCIENCE

Course Hours

Microsoft Visual Basic 2005: Reloaded

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net

DC69 C# &.NET DEC 2015

Unit 3. Operators. School of Science and Technology INTRODUCTION

C# Programming in the.net Framework

C#.Net. Course Contents. Course contents VT BizTalk. No exam, but laborations

Basic Types, Variables, Literals, Constants

XQ: An XML Query Language Language Reference Manual

Chapter 2. Elementary Programming

Name Section: M/W or T/TH. True or False (14 Points)

SRE VIDYASAAGAR HIGHER SECONDARY SCHOOL. TWO MARKS

Microsoft Visual C# Step by Step. John Sharp

Introduction to Java & Fundamental Data Types

GE PROBLEM SOVING AND PYTHON PROGRAMMING. Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING

Sir Muhammad Naveed. Arslan Ahmed Shaad ( ) Muhammad Bilal ( )

Data and Variables. Data Types Expressions. String Concatenation Variables Declaration Assignment Shorthand operators. Operators Precedence

CS 112 Introduction to Programming

[CHAPTER] 1 INTRODUCTION 1

,


Java Fall 2018 Margaret Reid-Miller

Eng. Mohammed S. Abdualal

Programming for Engineers Iteration

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

S.Sakthi Vinayagam Sr. AP/CSE, C.Arun AP/IT

Expression Evaluation and Control Flow. Outline

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4. Epic Test Review 5 Epic Test Review 6 Epic Test Review 7 Epic Test Review 8

Absolute C++ Walter Savitch

Control Flow. COMS W1007 Introduction to Computer Science. Christopher Conway 3 June 2003

CSC Web Programming. Introduction to JavaScript

Preface to the Second Edition... xi A Note About Source Entry... xi

Operators in C. Staff Incharge: S.Sasirekha

CS 1313 Spring 2000 Lecture Outline

Chapter 2 Elementary Programming

UNIT- 3 Introduction to C++

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

c++ keywords: ( all lowercase ) Note: cin and cout are NOT keywords.

ANSI C Programming Simple Programs

CS313D: ADVANCED PROGRAMMING LANGUAGE

APCS Semester #1 Final Exam Practice Problems

Operators in java Operator operands.

PROGRAMMING FUNDAMENTALS

Java Quick Syntax Reference. Second Edition. Mikael Olsson

Midterm Review 01. SP17 ICS 111 Ed Meyer

MATLIP: MATLAB-Like Language for Image Processing

Chapter 1 & 2 Introduction to C Language

Typescript on LLVM Language Reference Manual

Programming Languages & Translators. XML Document Manipulation Language (XDML) Language Reference Manual

CHAD Language Reference Manual

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

CSC 1214: Object-Oriented Programming

Learning C# 3.0. Jesse Liberty and Brian MacDonald O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo


Microsoft. Microsoft Visual C# Step by Step. John Sharp

Declaration and Memory

COMSC-051 Java Programming Part 1. Part-Time Instructor: Joenil Mistal

1. What type of error produces incorrect results but does not prevent the program from running? a. syntax b. logic c. grammatical d.

Java Programming Basics. COMP 401, Spring 2017 Lecture 2

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath

About this exam review

Transcription:

QUESTION BANK: INTRODUCTION TO PROGRAMMING (HCS102) 1. a. Compare and contrast unboxing and widening using code snippets b. Write a code snippet to demonstrate an InvalidCastException [8] c. Explain any three applications supported by C# [7] 2. a. Write notes on types literals e. F, D, M, L etc [8] b. An escape character is a character with a special meaning. Comment. [7] c. Write notes on array access using examples 3. a. Write a program that would illustrate the concept of declaration and initialization of value/reference type variables. Use the following literals for initializing the variables. i. A ii. 50 iii. 123456789 iv. 1234567654321 v. True vi. 0.000000345 vii. 1.23e-5 [18] b. Write a program to perform the following tasks: i. Declare two variables x and y as float types variables ii. Declare m as an integer variable iii. Assign the values 75.86 to x and 43.48 to y iv. Assign the sum of x and y to m v. Display the value of m and comment your output [7] 4. a. Develop a program to demonstrate the concepts of boxing and unboxing

b. Compare and contrast jagged and rectangular arrays using code snippets [15] 5. a. Discuss boxing and unboxing in the context of value and reference types [8] b. Explain the switch case statement with the help of an example [9] c. Explain parameter arrays in C# and give rules governing them [8] 6. a. Explain any two conditional statements in C# with suitable examples [9] b. What is short-hand assignment operator? State advantages of using it [6] c. Identify 10 character escape sequences available in C# with the aid of code snippets (comment your code) 7. a. Write a program using the for statement and demonstrate the effect of the continue and break statement in each case [15] b. Comment of the use of the keywords void, public and static in Main method declaration 8. a. Compare and contrast equality and assignment operators in C# in relation with the if statement b. Define an operator and comment on the concept of precedence and associativity [5] c. Compare and contrast conditional AND and conditional OR using code snippets 9. a. How do we evaluate expressions using post (incrementing/decrementing) and pre (incrementing/decrementing) using examples b. What is a ternary operator and how is it evaluated? What are its strengths or weaknesses in relation to the if else statement [15] 10. Identify 5 jumping/branching statements in C# and explain them using code snippets [25] 11.

a. Compare and contrast do/do-while loop with the while statement [15] b. Compare and contrast the for and the foreach statement 12. a. Define identifiers in C# and rules that govern their naming using code snippets b. Define keywords and contextual keywords in C# with the aid of code snippets [15] 13. Write a program of your choice while implementing standard numeric format specifiers. Use comments [25] 14. a. How many types of comments are supported in C# and justify their rationale [7] b. A variable is a location in memory where a value can be stored for use by a program. Justify c. Which operator(s) is/are used to check (or uncheck) stack overflows during program execution. Use code snippets to support your answer [8] 15. Define the following keywords in the.net 16. 17. a. CLR b. MSIL c. CTS d. Managed code e. Virtual Object System a. Write notes on the process of promotion and narrowing using examples b. C# is a modern language. Justify using code snippets c. C# is a component-based language. Discuss [5] a. Explain jagged arrays. How are they different from rectangular arrays? b. What are checked and unchecked operators? Give an example [8]

c. Explain parameter arrays in C#. Give three restrictions in declaring parameter arrays [7] 18. a. Explain the for loop and while loop with proper syntax and examples [8] b. C# is modern type-safe, versionable and interoperable language. Justify [12] c. When do we use the break and continue statement inside a while loop [5] 19. a. What are jagged arrays? Discuss the syntax of creation and initialization of jagged arrays [8] b. How do you get formatted output using System.Console.WriteLine() method? Describe Integer and currency numeric formatting [6] c. Define a method and explain them with respect to passing parameters by value and by reference [11] 20. a. Explain simple if and nested if conditional statements with suitable examples [8] b. Write short notes on exception handling in C# [6] c. Write a program to implement the use of checked and unchecked operators in try catch block [11] 21. a. C# is a type-safe language. Comment [5] b. What is a CLR? Explain the role of CLR in the.net framework? [5] c. What is Mixed mode arithmetic expression? How is it evaluated? [5] d. How does the foreach statement differ from the for statement? Give a typical example where a foreach statement is used. 22. a. Write a program that would print the value 123.6759 in fixed-point format (use two different methods in each case) with the following specifications: i. Correct to two decimal places ii. Correct to zero decimal places [12]

b. When can the if statement be suitable than the switch statement (vice-versa) using examples [13] 23. a. Describe the following keywords using code snippets: i. dynamic ii. object iii. var [15] b. Write a program which solves a pair of simultaneous equation 24. Write a program which solves a sum of series in the form: a. n+2n+3n+ kn b. 1 2 +2 2 +3 2 + n 2 c. 2 2 +4 2 +6 2 + n 2 d. 1 2 +3 2 +5 2 + n 2 e. 1! +2! +3! + n! f. 1+2+3+ n g. 1+3+5+ n *and then rewrite the program so that you solve the sum of series with any lower limit and upper limit