Multiple Choice Questions, COPA, Semester-2. Dr.V.Nagaradjane

Similar documents
Such JavaScript Very Wow

Phụ lục 2. Bởi: Khoa CNTT ĐHSP KT Hưng Yên. Returns the absolute value of a number.

Client-Side Web Technologies. JavaScript Part I

PA R T. A ppendix. Appendix A VBA Statements and Function Reference

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8

Chapter 1 Introduction to Computers and the Internet

PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore WEB PROGRAMMING Solution Set II

Active Planner. How to Create and Use Database Query Formulas

Variable Manipulator Driver. Installation and Usage Guide. Revision: 1.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Coding in JavaScript functions

Downloaded from Chapter 2. Functions

Language Fundamental of VB.NET Part 1. Heng Sovannarith

By the end of this section of the practical, the students should be able to:

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

JavaScript CS 4640 Programming Languages for Web Applications

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

Lecture 14. Introduction to JavaScript. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Chapter 4 Mathematical Functions, Characters, and Strings

String Functions on Excel Macros

( ) 1.,, Visual Basic,

CSC Web Programming. Introduction to JavaScript

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University

COMS 469: Interactive Media II

JavaScript: The Basics

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

CERTIFICATE IN WEB PROGRAMMING

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

SWITCH(DatePart("w",DateOfYear) IN(1,7),"Weekend",DatePart("w",DateOfYear) IN(2,3,4,5,6),"Weekday") AS DayType,

HTML5 and CSS3 More JavaScript Page 1

CGS 3066: Spring 2015 JavaScript Reference

VBSCRIPT - INTERVIEW QUESTIONS

The first sample. What is JavaScript?

Like most objects, String objects need to be created before they can be used. To create a String object, we can write

Programming for the Web with PHP

JavaScript Introduction

COMP519 Web Programming Lecture 11: JavaScript (Part 2) Handouts

JAVASCRIPT BASICS. JavaScript Math Functions. The Math functions helps you to perform mathematical tasks

Princess Nourah bint Abdulrahman University. Computer Sciences Department

CITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University

COMP284 Scripting Languages Lecture 14: JavaScript (Part 1) Handouts

Index COPYRIGHTED MATERIAL

VB Script Reference. Contents

GUJARAT TECHNOLOGICAL UNIVERSITY DIPLOMA IN INFORMATION TECHNOLOGY Semester: 4

Las Vegas, Nevada, December 3 6, Kevin Vandecar. Speaker Name:

CS110: PROGRAMMING LANGUAGE I

Namma Kalvi.

12. Numbers. Java. Summer 2008 Instructor: Dr. Masoud Yaghini

Program Design Phase. Algorithm Design - Mathematical. Algorithm Design - Sequence. Verify Algorithm Y = MX + B

LECTURE-2. Functions review HTML Forms. Arrays Exceptions Events. CS3101: Scripting Languages: Javascript Ramana Isukapalli

Overview About KBasic

Table of Contents. PREFACE... vii CONVENTIONS... vii HOW TO USE THIS MANUAL... vii Further Information...viii

A Complete Tutorial for Beginners LIEW VOON KIONG

Assoc. Prof. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Princeton University COS 333: Advanced Programming Techniques A Subset of JavaScript

VBScript: Math Functions

Module 4: Characters, Strings, and Mathematical Functions

A.A. 2008/09. Why introduce JavaScript. G. Cecchetti Internet Software Technologies

A Balanced Introduction to Computer Science, 3/E

People = End Users & Programmers. The Web Browser Application. Program Design Phase. Algorithm Design -Mathematical Y = MX + B

Language Fundamentals Summary

URLs and web servers. Server side basics. URLs and web servers (cont.) URLs and web servers (cont.) Usually when you type a URL in your browser:

Ordinary Differential Equation Solver Language (ODESL) Reference Manual

A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN

! Widely available. ! Widely used. ! Variety of automatic checks for mistakes in programs. ! Embraces full set of modern abstractions. Caveat.

Assoc. Prof. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

VBScript Reference Manual for InduSoft Web Studio

Programming Language 2 (PL2)

Full file at

Operators and Expressions

Fundamentals: Expressions and Assignment

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and

Language Fundamentals

Outline. Data and Operations. Data Types. Integral Types

The JavaScript Language

Long (or LONGMATH ) floating-point (or integer) variables (length up to 1 million, limited by machine memory, range: approx. ±10 1,000,000.

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

FANF. programming language. written by Konstantin Dimitrov. Revision 0.1 February Programming language FANF 1 / 21

Macro Programming Reference Guide. Copyright 2005 Scott Martinez

3 The Building Blocks: Data Types, Literals, and Variables

END-TERM EXAMINATION

Princeton University COS 333: Advanced Programming Techniques A Subset of JavaScript

LECTURE-3. Exceptions JS Events. CS3101: Programming Languages: Javascript Ramana Isukapalli

Chapter 3 : Computer Science. Class XI ( As per CBSE Board) Data Handling. Visit : python.mykvs.in for regular updates

In-Built Functions. String Handling Functions:-

a Why JavaScript? jonkv interactivity on the web CGI JavaScript Java Applets Netscape LiveScript JavaScript 1: Example

JavaScript Specialist v2.0 Exam 1D0-735

Fundamental Data Types. CSE 130: Introduction to Programming in C Stony Brook University

COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts

MATHEMATICAL / NUMERICAL FUNCTIONS

An overview about DroidBasic For Android

5. Strict mode use strict ; 6. Statement without semicolon, with semicolon 7. Keywords 8. Variables var keyword and global scope variable 9.

Calculations, Formatting and Conversions

write vs. writeln Prompting as Page Loads Today s Goals CSCI 2910 Client/Server-Side Programming Intermediate File vs. HTML Output

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

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

FORMULAS QUICK REFERENCE

JAVASCRIPT BASICS. JavaScript String Functions. Here is the basic condition you have to follow. If you start a string with

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

Transcription:

Multiple Choice Questions, COPA, Semester-2 DrVNagaradjane December 25, 2017

ii Author: DrVNagaradjane

Contents 1 Javascript 1 11 Algorithms 1 12 Flowcharts 1 13 Web servers 2 14 Features of web servers 3 15 Programming languages 3 151 Compiler based programming languages 3 152 Interpreter based programming languages 4 16 Introduction to JavaScript 4 17 JavaScript Events 5 18 JavaScript data types 6 19 Special characters in Javascript 7 110 Strings in JavaScript 8 111 Operators in Javascript 9 112 Math functions in Javascript 10 113 Control statements in Javascript 11 114 Loops in Javascript 12 115 Functions in Javascript 13 116 Objects in Javascript 14 117 Array and data objects in Javascript 14 118 Browser Object Model (BOM) in Javascript 15 119 Document Object Model (DOM) in Javascript 15 1191 Cookies in Javascript 15 2 Visual Basic for Application (VBA) 17 21 VBA shortcuts 18 22 Useful functions in VBA 18 23 Data types in VBA 19 24 Arithmetic operators in VBA 21 25 Comparison operators in VBA 21 26 Concatenation operators in VBA 22 27 Logical operators in VBA 22 28 Bitwise operators in VBA 23 29 Mathematical functions in VBA 24 210 String functions in VBA 24 211 Date/ Time functions 25 212 Arrays in VBA 26 213 Conditions in VBA 27 214 Loops in VBA 28 215 Message Box in VBA 28 216 Input box in VBA 30 217 Creating function in VBA 30 iii

iv CONTENTS 218 Creating Subroutines in VBA 30 219 Creating macros in VBA 31 220 Object Oriented Programming System (OOPS) through VBA 31 221 Event driven programming in VBA 31 222 GUI components in VBA 32 223 Properties for VBA controls 33 224 Events associated with VBA controls 33 225 ActiveX data objects in VBA 34 226 Debugging techniques in VBA 34 3 Smart accounting 37 31 Basics of accounting 37 32 Methods of accounting 37 33 Accounting concept 38 34 Golden rules of double entry system 39 35 Accounting termonologies 39 36 Voucher entry 39 37 Preparation of final accounts 40 38 Cash book 40 39 Ratio analysis 41 310 Depreciation 42 311 Stock management 42 312 VAT 43 313 Cash & fund flow 43 314 Tally 44 315 Accounting in Tally 44 316 Shortcuts in Tally 45 317 Double entry system in Tally 46 318 Budgeting system in Tally 47 319 Scenario 47 320 Variance & ratio analysis 48 321 Analysis of financial statements 48 322 Inventory basics 48 323 POS Invoicing 49 324 Taxation in Tally 49 325 Languages in Tally 50 4 E-Commerce 51 41 Introduction to E-Commerce 51 42 Types of E-Commerce 51 43 Scope of E-Commerce platforms 51 44 Benefits of E-Commerce 52 45 Capabilities required for E-Commerce platform 52 46 Differences between E-Commerce and traditional commerce 53 47 Types of E-Commerce websites 53 48 Modes of payment for E-Commerce 54 49 Payment gateway 55 410 General questions on E-Commerce 55 Author: DrVNagaradjane

CONTENTS v 5 Cyber security 59 51 Introduction to cyber security 59 52 Threats to information security 59 53 Vulnerability and risk management 60 54 Directory service 60 55 Access control 60 56 Software development security 61 57 Privacy protection 61 58 Information security audit 62 59 Information Technology (IT) Act 62 6 General Questions on VBA 65 Author: DrVNagaradjane

vi CONTENTS Author: DrVNagaradjane

Chapter 1 Javascript 11 Algorithms 1 The sequence of steps taken to solve a problem is called explanation (b) steps algorithm item Answers (1-1) 1 12 Flowcharts 1 Graphical representation of the flow of program is called executable code (b) flow chart source code algorithm 2 The oval symbol denotes operation in flowchart start/ end (b) continuation/ connector flow direction input/ output 3 The circle symbol denotes operation in flowchart start/ end (b) continuation/ connector flow direction input/ output 4 The parallelogram symbol denotes operation in flowchart start/ end (b) continuation/ connector flow direction input/ output 5 The arrow symbol denotes operation in flowchart start/ end (b) continuation/ connector flow direction input/ output 6 The rectangle symbol denotes operation in flowchart start/ end (b) processing decision making/ looping input/ output 7 The rhombus symbol denotes operation in flowchart start/ end (b) processing decision making/ looping input/ output 8 symbol in flowchart denotes start/ end of flow (b) 9 symbol in flowchart denotes continuation or connector (b) 10 symbol in flowchart direction of flow of program 1

2 13 WEB SERVERS (b) 11 symbol in flowchart denotes input/ output (b) 12 symbol in flowchart denotes processing (b) 13 symbol in flowchart denotes decision making (b) Answers (2-14) 1 (b) 2 3 (b) 4 5 6 (b) 7 8 9 (b) 10 11 12 13 13 Web servers 1 Web servers send pages in response to client request Word documents (b) L A TEX documents Powerpoint documents HTML documents 2 HTML stands for Higher Text Markup Language (b) Hyper Text Markup Language Hyper Transfer Markup Language Hyper Text Manipulation Language 3 HTTP stands for Hyper Text Transfer Protocol (b) Hyper Transmission Transfer Protocol Hyper Text Transfer Procedure Hiker Text Transfer Protocol 4 Port number handles HTTP communications 80 (b) 443 25 20 5 HTTPS stands for Hyper Text Transfer Protocol Secure (b) Hyper Transmission Transfer Protocol Secure Hyper Text Transfer Procedure Secure Hiker Text Transfer Protocol Secure 6 Port number handles HTTPS communications 80 (b) 443 25 20 7 When HTTPS protocol is used, browser shows a icon near the address bar open lock (b) lock with cross mark ( ) danger icon green lock 8 SSL stands for Secure Surfing Layer (b) Second Socket Layer Secure Socket Layer Secure Socket Link 9 Scripting languages like PHP, Perl, Python, ASPNET, etc, executed by a web server are called side scripts server (b) client way unrelated 10 Scripting languages like Javascript, VB- Script, etc, executed by a browser are called side scripts server (b) client way unrelated 11 is a popular open source web server available free of cost Apache (b) Microsoft Internet Information Server Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 3 Google Web Server (GWS) ngyngx 12 MS IIS in web servers stands for Microsoft Internet Interchange Server (b) Microsoft Internet Information Signal Microsoft Internet Information Server Microsoft Integrated Information Server Answers (15-26) 1 2 (b) 3 4 5 6 (b) 7 8 9 10 (b) 11 12 14 Features of web servers 1 URL stands for United Resource Locator (b) Uniform Resource Locator Uniform Resource Loader Uniform Register Locator 2 The first part of URL placed to the left side of : (colon) symbol is protocol (b) path document name 3 The last part of URL placed to the right side of / (forward slash) symbol is protocol (b) path document name 4 The part of URL placed between the protocol and document name and separated by / (forward slash) symbol is protocol (b) path document name 5 Normally, the URL for an HTML document begins with http (b) https both a and b neither a nor b Author: DrVNagaradjane Answers (27-31) 1 (b) 2 3 4 (b) 5 15 Programming languages 151 Compiler based programming languages 1 Human readable program is called machine code (b) source code mnemonic code key code 2 A compiler converts source code to code executable machine code (b) source code mnemonic code key code 3 converts source code to executable machine code document processor (b) spreadsheet program browser compiler 4 The rules to be followed in writing source code are called of a programming language syntax (b) bugs laws punishments 5 The errors caused by improper syntax in source code are called syntax (b) bugs laws punishments 6 Compilation is to create an executable program from source code done every time the source code needs to run (b) never done always incomplete done only once 7 Compiled machine code runs interpreted source code faster than (b) slower than as fast as 8 Assembly language, C, C++, Java, C# are examples of programming languages interpreter based (b) browser based

4 16 INTRODUCTION TO JAVASCRIPT compiler based Excel based 9 Compiler based programming languages are data types and syntax errors liberal (b) strict uncaring very lenient about 152 Interpreter based programming languages 10 The special program which executes source code one line (or few lines) at a time is called linker (b) loader compiler interpreter 11 Interpreted programs run compiled executable code slower than (b) faster than as fast as much faster than 12 Usually, interpreted languages are a bit about data types and syntax strict (b) very strict liberal stringent 13 Javascript and VBScript are examples of based scripting languages browser (b) compiler MS Office 14 Javascript, Perl, Python, PHP, Linux/ Unix shell script, etc are examples of based programming languages compiler (b) interpreter MS Office Answers (32-45) 1 (b) 2 3 4 5 (b) 6 7 8 9 (b) 10 11 12 13 14 (b) 16 Introduction to JavaScript 1 Javascript can be used for programming client side browser (b) server side (using Node JS) game development/ desktop applications & mobile apps all of them 2 Javascript variables are typed statically (b) strongly dynamically globally 3 Javascript language supports concepts of programming object oriented (b) procedural imperative/functional all of them 4 Design concepts of Javascript language were taken from C & C# (b) COBOL & ADA BASIC & FORTRAN Self & Scheme 5 JavaScript runs was developed by Netscape Communications (b) Microsoft corporation Sun Microsystems Oracle 6 Javascript code is written within tags < html > < /html > (b) < body > < /body > < script > < /script > < table > < /table > 7 Javascript script type is identified by the parameter type= text/vbscript (b) text/javascript text/html text/plain 8 Javascript language is identified by the parameter language= javascript (b) vbscript vba java 9 Javascript complies with standard Indian (b) British ASCII ECMA-262 & ISO/IEC 16262 10 Javascript objects support the dot notation (eg objx=2) to access member variables in addition to notation Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 5 array (obj[ x ]=2) (b) block (obj{ x }=2) function (obj( x )=2) tag (obj< x >= 2) 11 statement in JavaScript helps to evaluate any mathematical string at runtime value (b) eval calc cal 12 Method is a function bound to a procedure (b) a library a script an object 13 The system of notations used to effectively process string related operations is called impression (b) parser regular expression concatenation 14 External javascript files should have asp as file name extension (b) html php js 15 In JavaScript, is used for multiline comments /* */ (b) { } # # $ $ 16 In JavaScript, is used for single line comments { } (b) // # # $ $ 17 In JavaScript, keywords/ reserved words be used as variables, labels or function names may (b) should always can must not Answers (46-62) 1 2 3 4 5 6 7 (b) 8 9 10 11 (b) 12 13 14 15 16 (b) 17 17 JavaScript Events 1 event gets activated when a component looses focus Author: DrVNagaradjane onfocus (b) onblur onclick onerror 2 event gets activated when a component gains focus onfocus (b) onblur onclick onerror 3 event gets activated when an error occurs during execution of script onfocus (b) onblur onclick onerror 4 event gets activated when a component is clicked onfocus (b) onblur onclick onerror 5 event gets activated when a key moves down onkeydown (b) onkeyup onkeypress onmouseover 6 event gets activated when a key is pressed onkeydown (b) onkeyup onkeypress onmouseover 7 event gets activated when a key moves up onkeydown (b) onkeyup onkeypress onmouseover 8 event gets activated when mouse moves over a component onkeydown (b) onmouseout onkeypress onmouseover 9 event gets activated when mouse moves out from a component onmousedown (b) onmouseout onload onmouseover 10 event gets activated after loading a script file onmousedown (b) onmouseout onload onmouseover 11 event gets activated when mouse key pressed onmousedown (b) onmouseout onload onmouseover Answers (63-73) 1 (b) 2 3 4 5 6 7 (b) 8 9 (b) 10 11

6 18 JAVASCRIPT DATA TYPES 18 JavaScript data types 1 is the Javascript data type to handle numbers Number (b) String Boolean null 2 is the Javascript data type to handle character strings Number (b) String Boolean null 3 is the Javascript data type to handle the results of logical comparisons (TRUE or FALSE) Number (b) String Boolean null 4 is the Javascript data type to handle undefined data types Undefined (b) Object Number String 5 is the Javascript data type to handle objects Undefined (b) Object Number String 6 is the keyword used in Javascript to define a variable Data (b) double var DIM 7 denotes a value which is not a number (eg, result of division by zero) in Javascript NaN (b) infinity -infinity isnan() 8 denotes inifinite value in Javascript NaN (b) infinity -infinity isnan() 9 denotes negative inifinite value in Javascript NaN (b) infinity -infinity isnan() 10 tests whether a value is not a number in Javascript NaN (b) infinity -infinity isnan() 11 maximum permissible number value in Javascript MAX VALUE (b) MIN VALUE NEGATIVE INFINITY POSITIVE INFINITY 12 minimum permissible number value in Javascript (b) MAX VALUE MIN VALUE NEGATIVE INFINITY POSITIVE INFINITY 13 value of positive infinity in Javascript MAX VALUE (b) MIN VALUE NEGATIVE INFINITY POSITIVE INFINITY 14 value of negative infinity in Javascript MAX VALUE (b) MIN VALUE NEGATIVE INFINITY POSITIVE INFINITY 15 function converts a string value to generic number value Number() (b) ParseFloat() ParseInt() tostring() 16 function converts a string value to integer value Number() (b) ParseFloat() ParseInt() tostring() 17 function converts a string value to floating point value Number() (b) ParseFloat() ParseInt() tostring() 18 function converts a number value to string value Number() (b) ParseFloat() ParseInt() tostring() 19 returns a number formatted in exponential notation toexponential() (b) tofixed() toprecision() valueof() 20 returns a number formatted to specified length toexponential() (b) tofixed() toprecision() valueof() 21 returns a number rounded to specified number of digits toexponential() (b) tofixed() toprecision() valueof() Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 7 22 function creates a new array newvar() (b) newarray() newdim() Redim() 23 Members of an array have index values starting from 0 (b) 1 100 1000 24 Identify the wrong variable declaration from the following: var x2=10; (b) var x=2; var 1x = 3; var name= Krish 25 Identify the wrong variable declaration from the following: var x2=10; (b) var x=2; var xy = 3; var name= Krish 26 Identify the wrong variable declaration from the following: var x2=10; (b) var x=2; var x y = 3; var name= Krish 27 Identify the wrong initialization of variable from the following: var x2=10; (b) var x=2; var x=3; var name= Krish 28 A variable declared outsdide the scope of any function is an invalid variable (b) a global variable a variable with scope limited to a function a variable having scope inside a block Answers (74-101) 1 2 (b) 3 4 5 (b) 6 7 8 (b) 9 10 11 12 (b) 13 14 15 16 17 (b) 18 19 20 21 (b) 22 (b) 23 24 25 26 27 28 (b) Author: DrVNagaradjane 19 Special characters in Javascript 1 Special characters are otherwise called escape sequaneces (b) invalid characters wrong characters constants 2 denotes backspace in Javascript \b (b) \t \n \v 3 denotes newline in Javascript \b (b) \t \n \v 4 denotes tab in Javascript \b (b) \t \n \v 5 denotes vertical tab in Javascript \b (b) \t \n \v 6 denotes form feed (page eject for printer) in Javascript \f (b) \r \\ \ 7 denotes enter key in Javascript \f (b) \r \\ \ 8 denotes simple back slash in Javascript \f (b) \r \\ \ 9 denotes single quote in Javascript

8 110 STRINGS IN JAVASCRIPT \f (b) \r \\ \ 10 denotes double quotes mark in Javascript \f (b) \r \ \ Answers (102-111) 1 2 3 4 5 6 7 (b) 8 9 10 110 Strings in JavaScript 1 function in Javascript returns length of a string length() (b) charat() charcodeat() concat() 2 function in Javascript joins two strings length() (b) charat() charcodeat() concat() 3 function in Javascript returns the character found at specified location in a string length() (b) charat() charcodeat() concat() 4 function in Javascript returns the unicode value of the character found at specified location in a string length() (b) charat() charcodeat() concat() 5 function in Javascript returns the first found location where given pattern occurs in the target string indexof() (b) lastindexof() substr() substring() 6 function in Javascript returns the last found location where given pattern occurs in the target string indexof() (b) lastindexof() substr() substring() 7 function in Javascript returns the substring from given index location to specified length indexof() (b) lastindexof() substr() substring() 8 function in Javascript returns the substring from given index location to specified ending index location indexof() (b) lastindexof() substr() substring() 9 function in Javascript returns the string in upper case characters tolowercase() (b) touppercase() trim() fromcharcode() 10 function in Javascript returns the character equivalent of given unicode value tolowercase() (b) touppercase() trim() fromcharcode() 11 function in Javascript returns the string in lower case tolowercase() (b) touppercase() trim() fromcharcode() 12 function in Javascript removes space, tab or other space holders from beginning and end of a string tolowercase() (b) touppercase() trim() fromcharcode() Answers (112-123) 1 2 3 (b) 4 5 6 (b) 7 8 9 (b) 10 11 12 Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 9 111 Operators in Javascript 1 denotes the bitwise AND operator in Javascript & (b) 2 denotes the bitwise NOT operator in Javascript & (b) 3 denotes the bitwise OR operator in Javascript & (b) 4 denotes the bitwise XOR operator in Javascript & (b) 5 denotes the bitwise LEFT SHIFT operator in Javascript << (b) >> 6 denotes the bitwise RIGHT SHIFT operator in Javascript << (b) >> 7 operator in Javascript compares whether two expressions are EQUAL == (b)!= ===!== 8 operator in Javascript compares whether two expressions are EQUAL using strict comparison rules == (b)!= ===!== 9 operator in Javascript compares whether two expressions are NOT == EQUAL (b)!= ===!== 10 operator in Javascript compares whether two expressions are NOT EQUAL using strict comparison rules == (b)!= ===!== 11 operator in Javascript compares whether the left side expression is LESS THAN the right side one < (b) > <= >= 12 operator in Javascript compares whether the left side expression is GREATER THAN the right side one < (b) > <= >= 13 operator in Javascript compares whether the left side expression is LESS THAN the right side one < (b) > <= >= 14 operator in Javascript compares whether the left side expression is GREATER THAN OR EQUAL TO the right side one < (b) > <= >= 15 operator in Javascript compares whether the left side expression is LESS THAN OR EQUAL TO the right side one < (b) > <= >= 16 operator in Javascript tests whether the left side value is found in the right side collection < (b) > in instanceof 17 operator in Javascript tests whether a variable belongs to particular datatype < (b) > in instanceof 18 operator in Javascript increments the given variable x BEFORE evaluting the expression x + + (b) + + x x x 19 operator in Javascript increments the given variable x AFTER evaluting the expression Author: DrVNagaradjane

10 112 MATH FUNCTIONS IN JAVASCRIPT x + + (b) + + x x x 20 operator in Javascript decrements the given variable x BEFORE evaluting the expression x + + (b) + + x x x 21 operator in Javascript decrements the given variable x AFTER evaluting the expression x + + (b) + + x x x 22 operator in Javascript multiplies the left and right side number values and assigns the result to the left side variable = (b) / = + = = 23 operator in Javascript divides the left side value by the right side value and assigns the result to the left side variable = (b) / = + = = 24 operator in Javascript substracts the right side value from the left side value and assigns the result to the left side variable = (b) / = + = = 25 operator in Javascript adds the left and right side number values and assigns the result to the left side variable = (b) / = + = = Answers (124-148) 1 2 3 (b) 4 5 6 (b) 7 8 9 (b) 10 11 12 (b) 13 14 15 16 17 18 (b) 19 20 21 22 23 (b) 24 25 112 Math functions in Javascript Mathsin() (b) Mathcos() Mathacos() Mathabs() 2 function in Javascript returns sine value of its argument Mathsin() (b) Mathcos() Mathacos() Mathabs() 3 function in Javascript returns cosine value of its argument Mathsin() (b) Mathcos() Mathacos() Mathabs() 4 function in Javascript returns cos 1 value of its argument Mathsin() (b) Mathcos() Mathacos() Mathasin() 5 function in Javascript returns sin 1 value of its argument Mathsin() (b) Mathcos() Mathacos() Mathasin() 6 function in Javascript returns tangent value of its argument Mathtan() (b) Mathcos() Mathacos() Mathatan() 7 function in Javascript returns tan 1 value of its argument Mathtan() (b) Mathcos() Mathacos() Mathatan() 8 function in Javascript returns the higher integer value for given floating point number (eg, return value for 21 is 3) Mathrandom() (b) Mathceil() Mathfloor() Mathround() 9 function in Javascript returns the lower integer value for given floating point number (eg, return value for 28 is 2) Mathrandom() (b) Mathceil() Mathfloor() Mathround() 10 function in Javascript returns the nearest integer value for given floating point number (eg, return value for 21 is 2; that for 28 is 3) Mathrandom() 1 function in Javascript returns positive value of its argument, irrespective of whether the input was positive or negative Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 11 (b) Mathceil() Mathfloor() Mathround() 11 function in Javascript returns random number between 0 and 1 (0 included, 1 excluded) Mathrandom() (b) Mathceil() Mathfloor() Mathround() 12 function in Javascript returns natural logarithm of given value Mathrandom() (b) Mathceil() Mathlog() Mathexp() 13 function in Javascript returns anti-logarithm of given value Mathrandom() (b) Mathceil() Mathlog() Mathexp() 14 function in Javascript returns the first number raised to the power of second number Mathpow() (b) Mathmax() Mathmin() Mathsqrt() 15 function in Javascript returns the maximum of the given collection of numbers Mathpow() (b) Mathmax() Mathmin() Mathsqrt() 16 function in Javascript returns the minimum of the given collection of numbers Mathpow() (b) Mathmax() Mathmin() Mathsqrt() 17 function in Javascript returns the square root of the given collection of numbers Mathpow() (b) Mathmax() Mathmin() Mathsqrt() Answers (149-165) 1 2 3 (b) 4 5 6 7 8 (b) 9 10 11 12 13 14 15 (b) 16 17 113 Control statements in Javascript 1 In javascript, if else condition helps to execute a block of statements only if a condition is fulfilled (b) without any condition without any restriction randomly 2 The value of x after executing the following statements would be var x, y=10; if(y < 10){ x=5; } else { x = 8; } 8 (b) 5 10 0 3 The value of x after executing the following statements would be var x, y=10; if(y == 10){ x=5; } else { x = 8; } 8 (b) 5 10 0 4 The switch case statement checks for several loops (b) blocks conditions runs 5 statement is used at the end of each case block in switch case condition continue (b) break default label 6 statement is used at the end of each case block in switch case condition continue (b) break default label 7 In switch case condition in Javascript, statement is executed if no case condition is fulfilled continue (b) break default label Author: DrVNagaradjane

12 114 LOOPS IN JAVASCRIPT 8 What would be the value of the variable x, after executing the following switch case statement? var x, y=3; switch(y) { case 1: x=10; break; case 2: x=15; break; case 3: x=20; break; default: x=25; } 10 (b) 15 20 25 9 What would be the value of the variable x, after executing the following switch case statement? var x, y=1; switch(y) { case 1: x=10; break; case 2: x=15; break; case 3: x=20; break; default: x=25; } 10 (b) 15 20 25 10 What would be the value of the variable x, after executing the following switch case statement? var x, y=2; switch(y) { case 1: x=10; break; case 2: x=15; break; case 3: x=20; break; default: x=25; } 10 (b) 15 20 25 11 What would be the value of the variable x, after executing the following switch case statement? var x, y=11; switch(y) { case 1: x=10; break; case 2: x=15; break; case 3: x=20; break; default: x=25; } 10 (b) 15 20 25 Answers (166-176) 1 2 3 (b) 4 5 (b) 6 (b) 7 8 9 10 (b) 11 114 Loops in Javascript 1 In Javascript, for loop contains parts 1 (b) 2 3 4 2 In Javascript, first part of for loop does parts condition checking (b) initialization increment/ decrement continue 3 In Javascript, second part of for loop does parts condition checking (b) initialization increment/ decrement continue 4 In Javascript, third part of for loop does parts condition checking (b) initialization increment/ decrement Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 13 continue 5 In Javascript, statement helps to skip the remaining statemets of the loop for next cycle of execution break (b) initialization increment/ decrement continue 6 In Javascript, statement helps to exit the loop break (b) initialization increment/ decrement continue 7 What would be the value of x, on completing the following for loop? var i,x=10; for(i = 10; i <= 12; i + +) { s+=i; } 43 (b) 45 55 66 8 In Javascript, the loop helps to process each element of an array in succession for (b) for in do while while 9 In Javascript, the loop helps to the following block of statements only if the condition is true for (b) for in do while while 10 In Javascript, the loop helps to the following block atleast once even if the condition is FALSE for (b) for in do while while Answers (177-186) 1 2 (b) 3 4 5 6 7 8 (b) 9 10 break (b) continue label function 2 Code block for each Javascript function is enclosed in ( ) (b) { } [ ] < > 3 Parameters/ arguments to be passed to a function are enclosed in after the name of the function ( ) (b) { } [ ] < > 4 is placed between function keyword and function parameters in Javascript Function opening (b) Function end Function name Function code block 5 The result of a Javascript function may be passed back using keyword function (b) return break continue 6 In Javascript, functions are also variables (b) objects both variables and objects neither variables nor objects 7 Any variable declared inside a function has validity within the block only (b) function only global scope constant 8 Any variable declared outside a function has validity within the block only (b) function only global scope constant Answers (187-194) 115 Functions in Javascript 1 2 (b) 3 4 5 (b) 6 7 (b) 8 1 In Javascript, keyword denotes beginning of a function Author: DrVNagaradjane

14 116 OBJECTS IN JAVASCRIPT 116 Objects in Javascript 1 Creating new data types through programming and adding new properties and methods to the data type is called programming rapid (b) object oriented procedural functional 2 The domain created by a programmer for placing all items related to a specific object/solution in Javascript is called object (b) namespace class property 3 The keyword used in Javascript to create a new data type is object (b) namespace class property 4 The variable placed inside a class definition to store values related to an object (such as colour, size, location, etc) is called object (b) namespace class property 5 The special method placed inside a class having the name of the class itself as the function name is constructor (b) encapsulation abstraction polymorphism 6 The ability of a class to derive the properties and methods of another class is called inheritance (b) encapsulation abstraction polymorphism 7 The ability to a method having the same name but different behaviour in different parent and child classes is called inheritance (b) encapsulation abstraction polymorphism 8 The ability of a class to bind properties and methods with different access levels is called inheritance (b) encapsulation abstraction polymorphism 9 The ability of a program object to reflect real world objects is called inheritance (b) encapsulation abstraction polymorphism Answers (195-203) 1 (b) 2 (b) 3 4 5 6 7 8 (b) 9 117 Array and data objects in Javascript 1 A collection of values accessible through an index is called array (b) function variable block 2 The array index begins at in Javascript 3 (b) 2 1 0 3 each element of an array may be of data type(s) different (b) only the same only integer only float 4 What would be the value stored in name[2]? var name=new Array( Krish, Ram, Shiva,27); Krish (b) Ram Shiva 27 5 What would be the value stored in name[3]? var name=new Array( Krish, Ram, Shiva,27); Krish (b) Ram Shiva 27 6 Length of an array may be accessed using property length (b) size width height 7 Index of an array may be Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 15 (b) number string either number or string neither number nor string 8 Array having string value for index is called array assistant (b) associative decent string Answers (212-217) 1 2 3 4 5 6 (b) 119 Document Object Model (DOM) in Javascript Answers (204-211) 1 2 3 4 5 6 7 8 (b) 118 Browser Object Model (BOM) in Javascript 1 The standard interfaces provided by a browser for interaction with program script is called Browser Object Model (b) Browser Opening Model Brown Object Model Browser Object Mission 2 BOM stands for Browser Object Model (b) Browser Opening Model Brown Object Model Browser Object Mission 3 Browser Object Model supports access to object window (b) document innerhtml all of them 4 WindowLocation object supports properties href (b) hostname/protocol pathname all of them 5 WindowNavigator object supports properties appname/appcodename (b) platform cookieenabled/javaenabled all of them 6 Methods of BOM (Browser Object Model) are called on object document (b) window button text 1 The support provided for various components of a HTML document (like head, title, body, etc in a browser is called Document Object Model (b) Dominant Object Model Document Office Model Document Object Management 2 The abbreviation DOM stands for Document Object Model (b) Dominant Object Model Document Office Model Document Object Management 3 DOM permits access to methods docuemntgetelementbyid() (b) documentgetelementsbytagname() documentgetelementbyclassname() all of them 4 HTML element in DOM offers properties innerhtml (b) attribute setattribute(attrib, val) all of them 5 Methods of DOM (Document Object Model) are called on object document (b) window button text 1191 Cookies in Javascript 6 A text file used to save name, value pairs related to website visited by a browser is called memory (b) history cookie script 7 Cookie may have expires property which contains name of owner (b) date and time of expiry Author: DrVNagaradjane

16 119 DOCUMENT OBJECT MODEL (DOM) IN JAVASCRIPT name of browser name of the web server 8 property of the document class permits access to cookie getelementbyid (b) cookie innerhtml getelementbyname 9 What would be the value of pass property in the following cookie? documentcookie= id=vi;pass=ret;org=iti ; vi (b) ret iti 10 Image object in Javascript supports methods/properties ismap/ usemap (b) naturalheight/ naturalwidth width/ height/ vspace all of them 11 property of Javascript helps to set a cookie documentcookie (b) windowalert windowhistoryback windowprompt 12 The statement documentcookie= name=gayathri; sets a cookie with name property What is the value of the name property? name (b) ; Gayathri 13 What does the following statement do? var x = documentcookie; gets all cookies in a variable named x (b) prompts for input and stores the input value in x alerts regarding an error sets the background color of the document Answers (218-230) 1 2 3 4 5 6 7 (b) 8 (b) 9 (b) 10 11 12 13 Author: DrVNagaradjane

Chapter 2 Visual Basic for Application (VBA) 1 VBA Stands for Visual Binary Applications (b) Visual Basic for Animations Viral Basic for Applications Visual Basic for Applications 2 VBA has a coding, compilation, running and debugging environment called Integrated Development Environment (IDE) (b) Editor Highlighter Compiler 3 IDE stands for Internal Development Environment (b) Integrated Design Environment Integrated Development Environment Integrated Drafting Environment 4 The programming environment which permits coding, compilation, running and debugging from a single window is called Integrated Development Environment (IDE) (b) Editor Highlighter Compiler 5 The IDE of VBA supports since it permits drag and drop approach for design of user interface Procedural Approach (b) reverse approach Rapid Application Development (RAD) postfix approach 6 RAD in the desing applications stands for Ready Application Development (b) Rapid Application Development Real Application Development Rapid Analysis Development 7 GUI stands for (b) General User Interface Graphical User Interaction Graphical User Interface Graphical Unified Interface 8 VBA permits of data from spreadsheets reading (b) writing both reading and writing neither reading nor writing 9 VBA supports ready made user interace components like UserForm, CommandButton (b) Label, TextBox, ComboBox, ListBox TabStrip, OptionButton, ToggleButton all of them 10 VBA supports through class module Object Oriented Programming System (OOPS) (b) Procedural programming Functional programming property based model 11 MS Office records macros in language VBA (b) C++ C# Java 12 VBA can be used to automate carried out through MS Excel data processing (b) graphing accessing cell values all of them 13 VBA code is compiled into an intermediate code called P-Code code (b) MicroSoft Intermediate Code (MSIL) Java Virual Machine (JVM) code Android Virtual Device (AVD) code 14 Excel file having VBA code is saved using the extension xlsx (b) xlsm xlst xls 17

18 21 VBA SHORTCUTS 15 MS Excel creates to execute VBA code real time computer (b) mobile computer tablet computer virual machine 16 Comment in VBA begins with character and continues till the end of that line & (b) / 17 characters should not be used in VBA variable names, (b) @, & $, # all of them 21 VBA shortcuts 18 is the shortcut to open VBA IDE from MS Excel Alt+F11 (b) Alt+F8 Ctrl+Break Ctrl+G 19 is the shortcut to open immediate window in VBA IDE Alt+F11 (b) Alt+F8 Ctrl+Break Ctrl+G 20 is the shortcut to open list of macros Alt+F11 (b) Alt+F8 Ctrl+Break Ctrl+G 21 is the shortcut to stop execution of programs in VBA IDE Alt+F11 (b) Alt+F8 Ctrl+Break Ctrl+G 22 is the shortcut to display information relating to selected component in VBA IDE Ctrl+I (b) Ctrl+J Ctrl+R Ctrl+Shift+I 23 is the shortcut to properties and methods of a component in VBA IDE Ctrl+I (b) Ctrl+J Ctrl+R Ctrl+Shift+I 24 is the shortcut to display project explorer in VBA IDE Ctrl+I (b) Ctrl+J Ctrl+R Ctrl+Shift+I 25 is the shortcut to display parameter information for selected element in VBA IDE Ctrl+I (b) Ctrl+J Ctrl+R Ctrl+Shift+I 26 is the shortcut to add breakpoint in VBA IDE F9 (b) F5 F1 F2 27 is the shortcut to display help in VBA IDE F9 (b) F5 F1 F2 28 is the shortcut to display object browser in VBA IDE F9 (b) F5 F1 F2 29 is the shortcut to run a program in VBA IDE F9 (b) F5 F1 F2 30 is the shortcut to display properties window in VBA IDE F4 (b) F5 F1 F2 Answers (231-260) 1 2 3 4 5 6 (b) 7 8 9 10 11 12 13 14 (b) 15 16 17 18 19 20 (b) 21 22 23 (b) 24 25 26 27 28 29 (b) 30 22 Useful functions in VBA 1 In VBA, the function Asc converts given character value to numeric code in system American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) Unicode 2 In VBA, the function AscB converts given character value to numeric code in system American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) Unicode Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 19 3 In VBA, the function AscW converts given character value to numeric code in system American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) Unicode 4 In VBA, the function Chr converts given numeric value to character value in system American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) Unicode 5 In VBA, the function ChrB converts given numeric value to character value in system American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) Unicode 6 In VBA, the function ChrW converts given numeric value to character value in system American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) Unicode System 7 In VBA, Cstr function converts any data to type Integer (b) Double Single String 8 CDbl function converts String to type Integer (b) Double Single String 9 In VBA, CInt function converts String to type Integer (b) Double Single String 10 In VBA, Csng function converts String to type Integer (b) Double Single String 11 In VBA, Val function converts String to type number (b) byte Currency Decimal 12 In VBA, CByte function converts String to type number (b) byte Currency Decimal 13 In VBA, CCur function converts String to type number (b) byte Currency Decimal 14 In VBA, CLng function converts String to type Long (b) byte Currency Decimal 15 In VBA, CDec function converts String to type number (b) byte Currency Decimal 16 function in VBA creates a custom error message Format (b) CVErr InputBox MsgBox 17 function in VBA formats a number according to given text strings containing 0, # and comma (,) Format (b) CVErr InputBox MsgBox 18 function in VBA displays a message Format (b) CVErr InputBox MsgBox 19 function in VBA displays an input box Format (b) CVErr InputBox MsgBox Answers (261-279) 1 2 (b) 3 4 5 (b) 6 7 8 (b) 9 10 11 12 (b) 13 14 15 16 (b) 17 18 19 23 Data types in VBA 1 data type in VBA stores true or false values Boolean (b) Integer Byte Long 2 Boolean data type in VBA has size of Author: DrVNagaradjane

20 23 DATA TYPES IN VBA 1 byte (b) 2 bytes 3 bytes 4 bytes 3 Byte data type in VBA has size of 1 byte (b) 2 bytes 3 bytes 4 bytes 4 Byte in VBA can store values in the range of 0 to 255 (b) -922,337,203,685,4775808 to +- 922,337,203,685,4775807 01-Jan-100 to 31-Dec-9999 ±79, 228, 162, 514, 264, 337, 593, 543, 950, 335 or ±79228162514264337593543950335 5 Currency data type in VBA has size of 2 bytes (b) 3 bytes 4 bytes 8 bytes 6 Currency data type in VBA can store values in the range of 0 to 255 (b) -922,337,203,685,4775808 to +- 922,337,203,685,4775807 01-Jan-100 to 31-Dec-9999 ±79, 228, 162, 514, 264, 337, 593, 543, 950, 335 or ±79228162514264337593543950335 7 Date data type in VBA has size of 2 bytes (b) 3 bytes 4 bytes 8 bytes 8 Date data type in VBA can store values in the range of 0 to 255 (b) -922,337,203,685,4775808 to +- 922,337,203,685,4775807 01-Jan-100 to 31-Dec-9999 ±79, 228, 162, 514, 264, 337, 593, 543, 950, 335 or ±79228162514264337593543950335 9 Decimal data type in VBA has size of 14 bytes (b) 8 bytes 4 bytes 2 bytes 10 Decimal data type in VBA can store values in the range of 0 to 255 (b) -922,337,203,685,4775808 to +- 922,337,203,685,4775807 01-Jan-100 to 31-Dec-9999 ±79, 228, 162, 514, 264, 337, 593, 543, 950, 335 or ±79228162514264337593543950335 11 Double data type in VBA has size of 14 bytes (b) 8 bytes 4 bytes 2 bytes 12 Double data type in VBA can store values in the range of ±179769313486232E308 to ±494065645841247E324 (b) -32,768 to +32,767-2,147,483,648 to +2,147,483,647 ±3402823E38 to ±1401298E45 13 Integer data type in VBA has size of 14 bytes (b) 8 bytes 4 bytes 2 bytes 14 Integer data type in VBA can store values in the range of ±179769313486232E308 to ±494065645841247E324 (b) -32,768 to +32,767-2,147,483,648 to +2,147,483,647 ±3402823E38 to ±1401298E45 15 Long data type in VBA has size of 14 bytes (b) 8 bytes 4 bytes 2 bytes 16 Long data type in VBA can store values in the range of ±179769313486232E308 to ±494065645841247E324 (b) -32,768 to +32,767-2,147,483,648 to +2,147,483,647 ±3402823E38 to ±1401298E45 17 Single data type in VBA has size of 14 bytes (b) 8 bytes 4 bytes 2 bytes 18 Single data type in VBA can store values in the range of ±179769313486232E308 to ±494065645841247E324 (b) -32,768 to +32,767-2,147,483,648 to +2,147,483,647 ±3402823E38 to ±1401298E45 19 Object data type in VBA has size of 14 bytes (b) 8 bytes 4 bytes 2 bytes 20 String data type in VBA has size of 14 bytes (b) 10+length of string bytes 4 bytes 2 bytes 21 String data type in VBA can store a maximum of characters 65,400 Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 21 (b) 32,767 2,147,483,648 100 22 Variant data type in VBA has size of 14 bytes (b) 10+length of string bytes 16 or 22+length in bytes 2 bytes 23 Variant data type can store String larger than 65,400 characters in length (b) number larger than Double both a & b 3 * 2 (b) 2 4 5 / 2 3 % 2 Answers (303-308) 1 2 3 4 5 6 (b) 25 Comparison operators in VBA Answers (280-302) 1 2 (b) 3 4 5 6 (b) 7 8 9 10 11 (b) 12 13 14 (b) 15 16 17 18 19 20 (b) 21 22 23 24 Arithmetic operators in VBA 1 The arithmetic operator in VBA takes the highest precedence % (b) + - 2 The arithmetic operator in VBA calcualtes power of a number % (b) + - 3 The arithmetic operator in VBA has precedence after the operator % (b) + - / 4 The arithmetic operator in VBA has precedence after the % operator * (b) + - / 5 The arithmetic operator in VBA has precedence after the / operator * (b) + - 6 In the following expression, find out the first operation: 3 * 2 + 5 / 2 + 3 % 2 * 2 4 1 operator in VBA returns true if the left and sides are equal = (b) <> < > 2 operator in VBA returns true if the left and sides are not equal = (b) <> < > 3 operator in VBA returns true if the left side is less than the right side = (b) <> < > 4 operator in VBA returns true if the left side is greater than the right side = (b) <> < > 5 operator in VBA returns true if the left side is less than or equal the right side <= (b) >= < > 6 operator in VBA returns true if the left side is greater than or equal to the right side <= (b) >= < > 7 What would be the result of the following comparison?: 5 < 3 true (b) false neither true nor false both true and false 8 What would be the result of the following comparison?: 5 > 3 true Author: DrVNagaradjane

22 26 CONCATENATION OPERATORS IN VBA (b) false neither true nor false both true and false 9 What would be the result of the following comparison?: 5 = 3 true (b) false neither true nor false both true and false 10 What would be the result of the following comparison?: 5 <= 3 true (b) false neither true nor false both true and false 11 What would be the result of the following comparison?: 5 >= 3 true (b) false neither true nor false both true and false 12 What would be the result of the following comparison?: 5 = 3 true (b) false neither true nor false both true and false Answers (309-320) 1 2 (b) 3 4 5 6 (b) 7 (b) 8 9 (b) 10 (b) 11 12 (b) 3 In VBA, using operator for concatenation results concatenation of Strings, irrespective of numeric or alphanumeric value stored in the Strings & (b) $ # + 4 Choose the result of the following VBA expression: x = 20 + 32 2032 (b) 52 3220 5 Choose the result of the following VBA expression: Choose the result of the following VBA expression: x = 20 & 32 2032 (b) 52 3220 6 Choose the result of the following VBA expression: x = Hi, + how are you? how are you, Hi? (b) Hi: how are you Hi, how are you? Hi? 7 Choose the result of the following VBA expression: x = Hi, & how are you? how are you, Hi? (b) Hi: how are you Hi, how are you? Hi? Answers (321-327) 1 2 3 4 (b) 5 6 7 26 Concatenation operators in VBA 1 and are the two concatenation operators available in VBA + and & (b) @ and % * and! # and $ 2 In VBA, using operator for concatenation results in addition if Strings have numeric value and concatenation if Strings have alphanumeric value & # (b) $ + 27 Logical operators in VBA 1 The operators in VBA which combine the results of several comparisons are called operators logical (b) arithmetical mathematical concatenation 2 The operator in VBA returns true only if both sides of the operator are true Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 23 OR (b) AND NOT XOR 3 The operator in VBA returns true only if given comparison is false OR (b) AND NOT XOR 4 The operator in VBA returns true if atleast one of the 2 expressions is true OR (b) AND NOT XOR 5 The operator in VBA returns true if only one of the 2 comparisons is true OR (b) AND NOT XOR 6 The expression in VBA (5<3) AND (4 > 2) results in true (b) false neither true nor false both true and false 7 The expression in VBA (5<3) OR (4>2) results in true (b) false neither true nor false both true and false 8 The expression in VBA (5<3) XOR (4>2) results in true (b) false neither true nor false both true and false 9 The expression in VBA (5>3) XOR (4>2) results in true (b) false neither true nor false both true and false 10 The expression in VBA NOT (4>2) results in true (b) false neither true nor false both true and false 11 The expression in VBA NOT (4<2) results in true (b) false neither true nor false both true and false Author: DrVNagaradjane Answers (328-338) 1 2 (b) 3 4 5 6 7 (b) 8 9 (b) 10 (b) 11 28 Bitwise operators in VBA 1 operators in VBA compare the corresponding bits of numbers to arrive a result logical (b) arithmetical mathematical bitwise 2 The operator in VBA returns 1 only if both bits are 1 OR (b) AND NOT XOR 3 The operator returns 1 if given bit is 0 and returns 0 if given bit is 1 OR (b) AND NOT XOR 4 The operator returns 1 if at least one of the bits is 1 OR (b) AND NOT XOR 5 The operator returns 1 if only one of the two bits is 1 and the other one is 0 OR (b) AND NOT XOR 6 The expression in VBA 5 AND 3 (101 AND 11) results in 1 (b) 3 5 7 7 The expression in VBA 5 OR 3 (101 OR 11) results in 1 (b) 3 5 7 8 The expression in VBA Dim x as Byte x=3 NOT x results in 11111100 or 252 (b) 00000011 or 3 neither a nor b both a & b 9 The expression in VBA 5 XOR 3 (101 XOR 011) results in 1 (b) 3 6 7

24 29 MATHEMATICAL FUNCTIONS IN VBA Answers (339-347) 1 2 (b) 3 4 5 6 7 8 9 29 Mathematical functions in VBA 1 function in VBA returns positive value of a number, irrespective of whether the input is positive or negative ABS (b) ATN COS EXP 2 function in VBA returns the cosine value of given number ABS (b) ATN COS EXP 3 function in VBA returns arc tangent (tan 1 ) of given input ABS (b) ATN COS EXP 4 function in VBA returns exponential value of given input ABS (b) ATN COS EXP 5 function in VBA returns integer part of given input FIX (b) FORMAT INT LOG 6 function in VBA returns integer portion of given input FIX (b) FORMAT INT LOG 7 function in VBA returns logarithm of given number to specified base FIX (b) FORMAT INT LOG 8 function in VBA returns formatted version of given number (the format being specified by 0 and #) FIX (b) FORMAT INT LOG 9 function in VBA initializes random seed SIN (b) RND RANDOMIZE SGN 10 function in VBA returns sine value of given number SIN RANDOMIZE (b) RND SGN 11 function in VBA returns the sign (+ or ) symbol of given number SIN (b) RND RANDOMIZE SGN 12 function in VBA returns a random number SIN (b) RND RANDOMIZE SGN 13 function in VBA rounds the given number to the nearest integer value ROUND (b) SQR TAN SGN 14 function in VBA returns tangent value of given number ROUND (b) SQR TAN SGN 15 function in VBA returns square root of given number ROUND (b) SQR TAN SGN 16 What is the result of the following expression in VBA?: FORMAT(2532864, ##,##,00000 ) 02532864 (b) 253286 00,00,02533 02533 Answers (348-363) 1 2 3 (b) 4 5 6 7 8 (b) 9 10 11 12 (b) 13 14 15 (b) 16 210 String functions in VBA 1 function in VBA returns the numeric value of given character in the American Standard Code of Information Interchange (ASCII) system ASC (b) CHR & INSTR 2 function in VBA returns concatenated new string from given String values ASC (b) CHR & INSTR 3 function in VBA returns character value of given numeric value ASC (b) CHR Author: DrVNagaradjane

Q Bank [COPA Semester - 2] 25 & INSTR 4 function in VBA returns location at which the second string occurs within the first string ASC (b) CHR & INSTR 5 function in VBA returns last location at which the second string occurs within the first string INSTRREV (b) LCASE LEFT RIGHT 6 function in VBA returns lowercase version of given string INSTRREV (b) LCASE LEFT RIGHT 7 function in VBA returns uppercase version of given string INSTRREV (b) LCASE LEFT UCASE 8 function in VBA returns given number of characters counted from the left of the string INSTRREV (b) LCASE LEFT RIGHT 9 function in VBA returns given number of characters counted from the right of the string INSTRREV (b) LCASE LEFT RIGHT 10 function in VBA returns length of given string LEN (b) LTRIM RTRIM TRIM 11 function in VBA removes white spaces from the left end of given string LEN (b) LTRIM RTRIM TRIM 12 function in VBA removes white spaces from the right end of given string LEN (b) LTRIM RTRIM TRIM 13 function in VBA removes white spaces from both left and right ends of given string LEN (b) LTRIM RTRIM TRIM 14 function in VBA extracts a substring from given start character for specified count of characters MID (b) REPLACE SPACE STR 15 function in VBA finds given string and replaces it with another Author: DrVNagaradjane MID (b) REPLACE SPACE STR 16 function in VBA returns specified number of spaces MID (b) REPLACE SPACE STR 17 function in VBA converts given number to string MID (b) REPLACE SPACE STR 18 function in VBA compares given strings, returns -1 if the first string is smaller than the second string, 0 if both are equal and 1 if the first is greater than the second string STRCOMP (b) STRCONV STRREVERSE VAL 19 function in VBA converts given string to uppercase, lowercase, propercase, or unicode STRCOMP (b) STRCONV STRREVERSE VAL 20 function in VBA reverses given string STRCOMP (b) STRCONV STRREVERSE VAL 21 function in VBA returns numeric value of string STRCOMP (b) STRCONV STRREVERSE VAL Answers (364-384) 1 2 3 (b) 4 5 6 (b) 7 8 9 10 11 (b) 12 13 14 15 (b) 16 17 18 19 (b) 20 21 211 Date/ Time functions 1 function in VBA returns today s date Date (b) DATEADD DATEDIFF DATEPART 2 function in VBA returns part of a date (YYYY for year, MM for month and DD for day of month)