Вы находитесь на странице: 1из 9

Q1.

True or False
1. Multiple inheritance is different from multiple levels of inheritance
(T)
in Multiple inheritance : if a function implemented in all classes that can make an
ambiguity .
In multiple levels of inheritance: if a function implemented in all classes it will go
to the root if its not in the root it goes to child one by one.
2. We use Expression Blend to make a Develop for the Application.
(F)
Visual studio.
3. We store all the data for the application in an Isolated storage file
(T)
4. Integer and single are value types
(T)
5. We can store the data in Isolated storage Setting
(T)
6. a=+1 is used to increment the value of variable a by 1
(F) a+=1
7. we show the Execution for the windows phone application in Expression Blend
(F) in Emulator
8. A Public function of a class can access a private function within the same class
(T)
9. If we press in the home button in windows phone mobile the application will be
in the activated mode
(F) Tombstone
10. Constructor in a method in a class
(F) Constructor is a stand alone method
11.

The operator && is similar to the operator &


(T)

12.
We use one try statement and one catch in a class only
(F)
13. For (
; ; i++ ) is a true statement
(F) (i) not initialized
14. X++ is called prefix
(F) Postfix
15. There is only a static data member
(F) & object data member
16. OOP is contain inheritance and encapsulation only
(F) & polymorphism
17. Windows phone application page is xml code file
(F) xaml

18. An object of a derived class cannot access private member of base class
(T)
19. The Application Bar take a five Icon Button
(F) 4
20. A class D can be derived from a class C which is derived from a class B which
is derived from a class E
(T)
21. We use TextBlock to to write the user in It
(F) TextBox
22. To change the keyboard in textbox we change the property text (T)
23. A function can return more than one value (T)
24. There is no private or protected inheritance in C#.NET
(F)C# allows public inheritance only
25.
In tombstone mode the application is terminated
(T)
26. We save the values in the application after the deactivated mode by
Querystring
(F) By state
27.
a function, The return statement is not required if the return type is anything
other than void. (F) if the return type is void
28. In C#, a function needs to be defined using the static keyword, so that it can
be called from the Main function.(T)
29. The Uri kind In navigation Services is Relative (T)
30. A function can have more than one parameter. Values of the parameters are
passed to the function when it is called. (T)
31. Canvas arrange the controls in stack
(F) Stackpanel
32.
The break command is used to exit a loop (T)
33. The new keyword can be used to allocate spaces for an array. (T)
34.

There are two different ways to implement multi selections in C# language.

(T) if...else and switch case

Q2. Choose the right answer


1- Which of the following is not a control in windows phone application?
a. TextBlock
b. TextBox
c. Label
d. Canvas

2- If (x==5&y>6) , if(x==5&&y>6)
Two statements
a. The same
b. Different result
e. Different performance

c. Not all the above


3- Which statement is a false statement?
a. The biggest drawback of using sequential files is that you have to read the file the
way you wrote it.
b. You cant change information within the sequential file.
c. Its very easy to write data to a sequential file.
d. You cant open a sequential file for reading and writing at the same time.
f. None of the above

4- What is the default access specified for variables &Method?


g. Private
a. Public
b. Internal
c. Protected
5- If you have an array of 20 elements, what is the good way to assign a value to each
element?
a. Assigning each element individually without using a loop
b. Using a loop to assign a value to each element

6- x=3

z=0
Do
z=z+1
x=x-z
While x<=1
How many times would the above loop be executed??
a.
b.
c.
d.

2
1
0
3

7- length=0

width=1
area=0
While area<35
length=length+2
width=width+1
area= length * width
Loop
After the execution of this code: area =
a.
b.
c.
d.

35
12
24
40

8- length=0

width=1
area=0
While area<35
length=length+2
width=width+1
area= length * width
Loop
After the execution of this code: width=
a.

b.
c.
d.

2
6
4

9- Amount=0

For i=0 to 5
Amount=Amount+1
Next i
After the execution of this code: Amount=
a.
b.
c.
d.

1
4
6
5

10- 36*(4-2)+(45/5-3)=
1- 78
2- 75
3- 48
4- 72

11- Can multiple catch blocks be executed for a single try statement? In other words
can code inside multiple catch blocks be executed?
a. Yes
b. No
c. Under certain conditions
12-

What is CLR?
a. Conventional language Returntime
b. Certified language Returntime
d. common language Returntime
c. Colloquial language Returntime
13- What is the output of this code?
For( ;
; )
Console .WriteLine ("Hi");
e. Infinite Hi
a. Error
b. Hi
c. Not all above
14- You create a string reference :
a. String {s};
b. String (s);
c. String [s];
f. String s;
15- Int [] myArray=new int [10]:
What will be the value of myArray[1]?
g. 0
a. 10
b. Null
c. A Null reference exception would throw unless myArray[1]is first initialized to value

16a.
b.
c.
h.
17-

What is the default return type for the default constructor?


Void
Int
String
Not any of the above
Which of the following is not Integer?

i.
a.
b.
c.

Char
Byte
Integer
Short

j.
a.
b.
c.

Which of the following are value types ?


Integer
Array
String
Class

a.
b.
k.
c.

Which of these is a not valid variable name?


X
X!
!X
X!X

18-

19-

20-

Which is the following is the correct default value of a Boolean type?


a. 0
b. 1
c. True
l. False
21- Different ways a method can be overloaded in c#.
a. Different parameter data types.
b. Different number of parameters
c. Different order of parameter.
m. All of above

22-

Which of the following will be the correct value of x?


Int x=2 + 3 * 6 / 2 1;
a. 14
n. 10
b. 20
c. 9

23- Which of the following will be the correct output for the c#.net program given
below?
Int x=0;
For ( int i=0 ; i<10 ; i++)
{
X++;
I++;
}
Console.Writeline(x);

a.
b.
o.
c.

10
4
5
6

24- 36*(4-2)+2*2/(7-3)= only 1


a. 78
b. 73
c. 48
d. 75
25- 18*(3-5+10)/(2+4)^2 =
a. 88
b. 70
c. 60
d. 4
26- Amount=0

For i=0 to 6
Amount=1
i=Amount
Next i
How many times would the above loop be executed? *
a.
b.
c.
d.

27- Let
a.
b.
c.
d.

infinity
5
6
4

x be an integer variable. What will be the result of the assignment x = 1/3 ?


0.30
0
undefined
0.33

28- An array
a.
b.
c.
d.

defined as int three[1][2][3]; defines a .


3
1
2
0

dimension
dimension
dimension
dimension

array.
array.
array.
array.

29- A compiler is
a. A method of describing the computer programming language to potential users.
b. A program itself, that helps in the translation of a computer program in a high level language into

machine language.
A human being who acts as the intermediary between the user of a computer and the computer
itself.
d. A hardware device that translates a computer program in a high level language into machine
language.
c.

30- Which one of the following is not a valid data type in C ?


a. int
b. char
c. text
d. float

31-

The output of this statements is ?


Int x=5;
Console .write (x+1);

Console .write (x);


p. 65
a. 66
b. 56
c. 55
32- The
a.
b.
c.
d.

binary number (11110001.11)2 is represented in octal as:


(361.6)8
(742.3)8
(742.6)8
(361.3)8

33- the binary number (11110001.11)2 is represented in hexadecimal as:


a. (C.F1)16
b. (F1.C)16
c. (F1.B)16
d. (151.B)16
34- Which statement is a false statement?
a. The biggest drawback of using sequential files is that you have to read the file the way you wrote it.
b. You cant change information within the sequential file.
c. Its very easy to write data to a sequential file.
d. You cant open a sequential file for reading and writing at the same time.
e. None of the above

35- Consider the following code:


Open SCRN: For Output As #1
Print #1, Hello
Close #1
This code is equivalent to:
a. Print Hello
b. Input Hello
c. Output Hello
d. None of the above
e. All of the above
36- Consider the following code:
Open DATA.DAT For Output As #1
Print#1 This is line number One
Close #1
Open DATA.DAT For Output As #1
Print#1 This is line number Two
Close #1
What will be written in the file?
a. This is line number One
b. This is line number One
This is line number Two
c. This is line number Two
d. None of the above
37- Consider the following code:
Dim arr (1 to 5) as integer
For i= 1 to 5 step 3
Print arr (i)
Next i
What are the elements that will be printed?
a. Element 1, 2, 3,4,5
b. Element 0,1, 2, 3,4,5
c. Element 1, 4
d. Element 1, 4,5
e. Element 1,3
38- Consider the following declaration of a record in QBASIC:
Type Employee
Name as String * 30

a.
b.
c.
d.

Salary as Single
Comm as Single
Kids as Integer
Gender as String * 1
End Type
Dim worker as Employee
What will be the length of record worker?
33
41
31
0

39- The
a.
b.
c.
d.

decimal number (123.75)10 is represented in binary as:


(1111011.11)2
(1100011.11)2
(1001011.11)2
(1111011.011)2

40- Which statement is true?


a. Low level programming language represents machine code instructions.
b. Low level programming language is designed to be understood by the computer.
c. Low level programming language is more difficult to learn.

q. All the above.


d.

41- The
a.
b.
c.
d.
e.

None of the above.


primary unit of data storage is:
Floppy disk.
Hard disk.
File
Magnetic tapes.
CD-ROM.

42- What is true about the DO-LOOP UNTIL?


a. You use DO-LOOP UNTIL when you know how many times to execute the loop.
b. You can control the DO-LOOP UNTIL based on a condition that will happen.
c. The body of the DO-LOOP UNTIL always executes at least one time.
d. a and b
e. b and c
43- The
a.
b.
c.
d.

Call method is used only with:


subroutines
Functions
Procedures
Parameters

44- If condition A is TRUE , condition B is FALSE ,and condition C is TRUE then


The expression ((A AND B) OR C) will be:
a. True
b. False

Q3. Modern essay questions


1. What is windows phone?
mobile operating systems developed by Microsoft for smartphones
2. What is Application Bar?
Its an horizontal bar @ the bottom of the screen provide users with quick access to
an applications most common tasks.
3. What is isolated storage?
isolated storage is a data storage mechanism that provides isolation and safety by
defining standardized ways of associating code with saved data.
4. What is isolated storage File?

isolated storage is a data storage mechanism that Create a file to store data in it
5. What Is Method overloading?
Method Overloading is a feature that allows a class to have two or more methods
having same name, if their argument lists are different.
Argument lists could differ in
1. Number of parameters.
2. Data type of parameters.
3. Sequence of Data type of parameters.
6. What is State?
When an app to be tombstoned after the user navigates away. If the user navigates
back to a tombstoned app, the app must restore its own state because it is no
longer in memory.
State can preserve the data for the page when navigating back
7. What is isolated storage Setting?
isolated storage Setting Used to to store application settings, which are perapplication.. For example, you can store application settings, such as number of
images to display per page, page layout customization settings, and so on.
8. What is QueryString?
QueryString is the string that is written in uri after the pagename by
concatenating ? +string to pass parameters when navigating between pages in
Windows Phone.
9. What is OOP?
A type of programming in which programmers define not only the data type of
a data structure, but also the types of operations (functions) that can be applied to
the data structure. In this way, the data structure becomes an object that includes
both data and functions. In addition, programmers can create relationships between
one object and another. For example, objects can inherit characteristics from other
objects.
10. What is Method Overloading?
1. Number of parameters.
2. Data type of parameters.
3. Sequence of Data type of parameters.
11. What is Class?
A class is a construct that enables you to create your own custom types by grouping
together variables of other types, methods and events.
12. What is Abstract Method?
Its a method with only signature without any implementation
13.
What is Static Data Member?
Static data member is data member declared by keyword static
- one copy of the data is maintained for all objects of the class

Вам также может понравиться