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

Csharp

The document contains a software engineer application exam with questions about C#, JavaScript, jQuery and SQL. It tests the candidate's knowledge on programming concepts and syntax related to these languages. It includes multiple choice questions, code writing questions and explanation questions.

Uploaded by

Marlo Gallano
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Csharp

The document contains a software engineer application exam with questions about C#, JavaScript, jQuery and SQL. It tests the candidate's knowledge on programming concepts and syntax related to these languages. It includes multiple choice questions, code writing questions and explanation questions.

Uploaded by

Marlo Gallano
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

MobileGroup Inc.

Name: _________________________________________ Date: _____________________


Degree:_________________________________________

Software Engineer Application Exam


Exam Questionnaire
C# Version

General Instruction:

1. C#: Encircle the letter of the correct answer


2. Javascript & Jquery: Encircle the letter of the correct answer
3. Write a sample code on items (1 - 4)
4. Explain the items (5 - 6) based on your programming knowledge and understanding.
5. SQL (7 – 10)
PART I (C#)

1 : Which of the following statements are TRUE about the .NET CLR?
1.It provides a language-neutral development & execution environment.
2.It ensures that an application would not be able to access memory that it is not authorized to access.
3.It provides services to run "managed" applications.
4.The resources are garbage collected.
5.It provides services to run "unmanaged" applications.
(A) Only 1 and 2
(B) Only 1, 2 and 4
(C) 1, 2, 3, 4
(D) Only 4 and 5

2 : In data reader, what can be used before read method?


(A) Getvalue
(B) Getstring
(C) GetNumber
(D) None

3 : What is ENUM?
(A) It is used to initialize variables
(B) It is used to define constants
(C) It is used to define variables
(D) None

4 : A variable which is declared inside a method is called a________variable


(A) Local
(B) Private
(C) Static
(D) Serial

5 : Can an Interface be instantiated directly?


(A) Yes
(B) No

6 : Which of the following are valid .NET CLR JIT performance counters?

1. Total memory used for JIT compilation


2.Average memory used for JIT compilation
3.Number of methods that failed to compile with the standard JIT
4.Percentage of processor time spent performing JIT compilation
5.Percentage of memory currently dedicated for JIT compilation
(A) 1, 2
(B) 1, 5
(C) 3, 4
(D) 4, 5
7 : Automatic paging is possible in
(A) datareader
(B) dataset
(C) datatabel
(D) all

8 : What does Dispose method do with connection object?


(A) Close the connection
(B) Temporary dispose the connection
(C) Deletes it from the memory
(D) All of the above

9 : Feature of a local variable


(A) It must be declared within a method
(B) It represent a class object
(C) It can be used anywhere in the program
(D) It must accept a class

10 : What is the Difference between Convert.ToInt32 and Int.Parse?


(A) Both are Same
(B) Convert.ToInt32 Can't Handle Null Values ,it will throws rgumentNullException error.
(C) Int.Parse Can't Handle Null values , It will throws ArgumentNullException Error.
(D) Both can Handle Null Values

11 : Which of the following jobs are NOT performed by Garbage Collector?

1.Freeing memory on the stack.


2.Avoiding memory leaks.
3.Freeing memory occupied by unreferenced objects.
4.Closing unclosed database collections.
5.Closing unclosed files.
(A) 1, 2, 3
(B) 1, 4, 5
(C) 3, 5
(D) 3, 4

12 : Identify which is true


(A) DataView ia subset of row and not columns
(B) find can be done only on sorted columns
(C) Sorting can be done on multiple columns
(D) None of these

13 : Is it possible to store multiple data types in System.Array?


(A) Yes
(B) No

14 : Sealed Classes cannot be a base class.


(A) True
(B) False
15 : In C#, the statement that is used to replace multiple if statements is called?
(A) The nestedif statement
(B) The #endif statement
(C) The switch case statement
(D) None of these

16 : Which of these string definitions will prevent escaping on backslashes in C#?


(A) string s = #.n Test string.;
(B) string s = @.n Test string.;
(C) string s = ..n Test string.;
(D) string s = .n Test string.;

17 : Code that targets the Common Language Runtime is known as


(A) Legacy
(B) Managed Code
(C) Unmanaged
(D) Native Code

18 : Which method do you invoke on the SQLDataAdapter object to load your dataset with data?
(A) Update
(B) Fill
(C) Gather
(D) Load

19 : Which of the following is/are true about the structure?


(A) Structures do not support Inheritance
(B) Structures are value type
(C) Structures can not have contractor
(D) All of the above are true

20 : Difference between Convert.ToString() and ToString()


(A) Convert.ToString() handle null values but ToString() don't
(B) Convert.ToString() only handle null values
(C) ToString() handle null values but Convert.ToString() don't
(D) ToString() output as per format supplied
PART II (JAVASCRIPT & JQUERY)

1. What should appear at the very end of your JavaScript?

Answer :

2. function first() {
window.a = 3;
}

function second() {
alert(a);
}
Assuming I call these functions in order, what's alerted?
(A) 0
(B) 3
(C) null
(D) undefined

3. What is the output of the following code snippet?


typeof ([]), typeof (new Array())

Answer :

4. JQuery.noConflict(true) is used to..

(A) Free up the $ symbol for use by other libraries


(B) Improve compatibility
(C) Remove all jQuery variables from the global scope
(D) All of the above

5. <script type="text/javascript">
var s = "9123456 or 80000?";
var pattern = /\d{4}/;
var output = s.match(pattern);
document.write(output);
</script>

(A) 9123
(B) 91234
(C) 80000
(D) None of the above

6. Which are the different ways to enumerate all properties of an object?

(A) for...in loops


(B) Object.keys()
(C) Object.getOwnPropertyNames()
(D) All of the above

7. Which of the following jQuery method returns the outer height (including the border) of an
element?

(A) getCSSHeight( )
(B) getHeight( )
(C) outerHeight( [margin] )
(D) None of the above.

8. Which JQuery function is used to prevent code from running, before the document is finished
loading?

(A) $(document).load()
(B) $(document).ready()
(C) $(body).onload()

9. Look at the following selector: $(":disabled"). What does it select?

Answer :

10. The __ operator determines the type of a given object.

(A) typeof
(B) void
(C) instanceof
(D) delete

11. Which of the following is correct?

(A) jQuery is a JSON Library


(B) jQuery is a JavaScript Library

12. var city = new Array("delhi", "agra", "akot", "aligarh","palampur");


console.log(city.pop());

(A) delhi
(B) palampur
(C) agra
(D) akot

13. Which JQuery method is used to switch between adding/removing one or more classes (for CSS)
from selected elements?

(A) switchClass()
(B) switch()
(C) toggleClass()
(D) altClass()

14. Which built-in method returns the calling string value converted to upper case?

(A) toUpperCase()
(B) toUpper()
(C) changeCase(case)
(D) None of the above.

15. What is the output of the following code snippet?

var str = "Apple, Banana, Kiwi";


var res = str.substring(7,13);

(A) Banana
(B) Apple
(C) Kiwi
(D) Banana, Kiwi

16.Which statement best explains what "unobtrusive JavaScript" is?

(A) JavaScript that doesn't annoy users


(B) JavaScript that is separate from HTML
(C) JavaScript that does not affect a web page
(D) JavaScript that works even with scripting turned off

17. Inside which HTML element do we put the JavaScript?

Answer :

18. What is the correct JQuery code to set the background color of all p elements to red?

Answer :

19. How to create a Date object in JavaScript?

(A) dateObjectName = new Date([parameters])


(B) dateObjectName.new Date([parameters])
(C) dateObjectName := new Date([parameters])
(D) dateObjectName Date([parameters])

20. Which of the following best describes JavaScript?

(A) a low-level programming language.


(B) a scripting language pre-compiled in the browser.
(C) a compiled scripting language.
(D) an object-oriented scripting language.
PART 3
1. Find the sum of all the multiples of 3 and 5 below 10
2. Write a class that will compute four basic arithmetic operation that will use a constractor to initialize
value of two numbers

sample object initialization


calc = Calculator (15,3);

Output:
Sum: 18
Difference: 12
Product: 45
Quotient: 5
3. Write a function that will check if all character in a string is lower case and check if input value is a
valid sting 

Output:
abcdefgh = true 
ABCdefgH = false
abcdefgh1234 = false
4. Write a function that will remove all special characters in a string 

Output:
abcd!ef123-=##ghi = abcdefghi123
5. What are the different access modifiers in C# and kindly explain each access modifiers?

6.  What are the fundamental principles of OOP and kindly explain each principle? 

You might also like