Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Delivery Assessment Questions:

==============================

1) When will be T will be replaced with the actual type in the following
program?

class ValueProcessor<T>
{
// Logic
}

b) Compile-time

2) How to restrict a class to be a base class?

a) Use sealed Keyword

3) Which of the following statement is true?

a) try block must be followed by catch or finally block or both


b) finally block cannot include return statement
c) try block can include another try block
d) all of the above => Right Option

4) What is the output of below code?

int? a = null;
int b = a ?? -1;
Console.WriteLine(b);

e) -1

5) Imagine you have a user service that sets the 'userName' of the user
making the request as a class level variable
And, the user service is registered as Scoped() method.

Client-1 and Client-2 are making the API requests at same time
Client-1 is setting the 'userName' to 'John'.
Client-2 is setting the 'userName' to 'Bob'.

Will there be a chance to override the value of 'userName' in any of the


above two API requests?

No

6) The partial class allows

a) Implementation of single class in Multiple .CS files.


d) partial keyword is used to build a partial class

7) Thread Synchronization deals with

d) All of the above


8) Which is not a type of constructor in C#?

c) Body Constructor

9) What is the correct statement for constructor?

d) All of the above

10) The internal access modifier is used for _______

a) Types and type members

11) Choose the valid statements w.r.t PATCH endpoint

d) Uses less bandwidth due to partial updates

12) Which of the following is true for ReadOnly variable?

a) Value will be assigned at runtime

13) Out of X and Y, identify the class which is an interface

Class X has the following members:

int value = 12;


String text = "Text";
final float rate = 1.5;
Class Y has the following members:
final String text = "Welcome!";

Y => Not Sure


Neither X nor Y

14) Which of the following is NOT a valid .NET Exception class

e) System.StackMemoryException

15) What is the output of below Code?

using System;
namespace MyApplication {
public class ClassA {
public static int a = 50;
}
public class ClassB:ClassA {
public static int a=100;
static void Main(string[] args) {
Console.WriteLine(a + ", " + ClassA.a);
}
}
}

100 50
16) Which of the following statements is correct for the below code
snippet?

interface A {
void func1();
int func2();
}
class B : A {
void func1() {
}
int A.func2() {
}

c) The definition of func1() in class B should be void A.func1()

17) What is the output of below code?

using System;
using System.Threading.Tasks;
class Program {
private static string result;
static void Main() {
SaySomething();
Console.WriteLine(result);
}
static async Task < string > SaySomething() {
await Task.Delay(5);
result = "Hello world!";
return " Something";
}
}

The program will output a blank line

18) Choose the valid options that result in a infinie loop in C#?

b) for(;;) {}
d) while(!false) {}

19) What is the output of below code?

int value = 10;


int size = sizeof(int);
console.write(size);

c) 4

20) Two threads T1 & T2 are trying to access a shared resource called X
and update different
values. How to programmatically control which thread execution to be
completed first and which
value will be updated?

a) No, we cannot control


21) What is the output of below code?

using System;
namespace MyApplication {
class Program {
static void Main (string[] args) {
int[,] Value = {{1,2}, {3,4}};
Console.WriteLine(Value.GetLength(0)+","+Value.GetLength(1));
}
}
}

2 2

22) What is the output of below code ?

using System;
class MyProgram {
static void Main(string[] args) {
int index = 6;
int[] arr = new int[5];
try {
arr[index] = 100;
}
catch(IndexOutOfRangeException e) {
Console.WriteLine("Index out of bounds occured");
}
Console.WriteLine("Program execution continued after Exception
Handling");
}
}

e) Outputs: Index out of bounds occurred

23) Which of the following statements applies to the situation where


Exception is not handled in the program.

b) CLR will terminate the program execution at the point where it


encounters an exception

24) Which of the following statements are true?

a) In XML Serialization only public fields are serialized


d) In Binary Serialization both public and private fields are serialized

25) Which of the below is correct on Mutex object in Threading?


d) All of the above

26) Which statement are true?

d) Abstract Factory design pattern follows open-closed principle


27) Which of the following statement should be included in the current set
of code to get the output as 10 20?

using System;
public class baseSample {
protected int a=20;
}
public class derivedSample : baseSample
{
int a=10;
public void display() {
/* add code here */
}
}

class Program {
static void Main(string[] args) {
derivedSample d = new derivedSample();
d.display();
Console.ReadLine();
}
}

Console.WriteLine(a + " " + base.a);

28) What is the output of below code?

using System;
namespace ABCD
{
class Sample {
public int num;
public int[] arr = new int[10];
public void Assign(int i, int val) {
arr[i] = val;
}
}

class Program {
static void Main(string[] args) {
Sample s = new Sample();
s.num = 100;
Sample.Assign(0,10);
s.Assign(0,9);
Console.WriteLine(s.arr[0]);
}
}
}

29) What is the output of the code?

using System;
interface A {
void func(int i);
}
class B1:A {
public int x;
public void func(int i) {
x = i*i;
}
}
class B2:A {
public int x;
public void func(int i) {
x=i/i;
}
}
class Program {
public static void Main(string[] args) {
B1 b1 = new B1();
B2 b2 = new B2();
b1.x = 0;
b2.x = 0;
b1.func(2);
b2.func(2);
Console.WriteLine(b1.x + " " + b2.x);
Console.ReadLine();
}
}

4 1

30) What is the output of the code?

using System;
public class Program {
public static void Main(string[] args) {
int i=3;
int j=2;
func1(ref i);
func2(out j);
Console.WriteLine(i + " " + j);
}
static void func1(ref int num) {
num = num + num;
}
static void func2(out int num) {
num = num * num;
}
}

d) Compile time error => Right Option

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++

1) Which of the below code snippets will give the same result?

let x = [1,2,3];
let y = [4,5,6];
const combinedArray1 = [...x, ...y];
console.log(combinedArray1)

let z = [3,4,5,6];
const combinedArray2 = [1,2,...z];
console.log(combinedArray2)

let a = [3,4];
const combinedArray3 = [1,2,...a,6];
console.log(combinedArray3)

1,2,3

2) Which of the following are the valid methods of an Array object?


reverse()
sort()
filter()

3) What is the correct statement tobind required and maxlength validators


to name field in
a reactive form?
name: ['', [Validators.required, Validators.maxLength(10)]]

4) Which of the following are the valid attribute-directives in Angular?


NgClass
NgStyle

5) When you hover your mouse over the host element(tag), the color of the
tag should
change. In addition, when the mouse is moved away, the color of the tag
should change
to its default color. To do this, you need to handle events raised on the
host element in
the directives class. Which decorator is used to implement this
functionality?

@HostListener

6) What will be the output of the below code?

import { PipeTransform } from '@angular/core';


...
export class LengthPipe implements PipeTransform {
length(value: string): string {
return "Length = "+value.length;
}
}
b) The LengthPipe clas has not implemented the transform() method of
PipeTranform Interface

7) In the below code snippet, what is the correct statement to be placed


at line6 to
display the 'numbers' array as a ...

import { component } from '@angular/core';


@Component({
selector: 'my-app',
template: `
<ul>
.........
</ul>
`
})
export class AppComponent {
numbers: any[] = [1,2,3];
}

d) <li *ngFor = 'let num of numbers'>{{num}}</li>

8) Which of the following are the valid methods of XMLHttpRequest object?


send()
open()
abort()

9) Identify the designed the below web page.

<html>
<head>
<style>
h1 p { color:blue; }
h1 { color:red; }
h2 { color:cyan; }
p { color:green; }
</style>
</head>
<body>
<h1>
Line1<br>
<p>
Line2
</p>
<h2>Line3</h2>
</h1>
<p> Line 4 </p>
</body>
</html>

What will be the color of Line1, Line2, Line3 and Line4 when the above web
page is rendered
on the browser.
Line1: red, Line2: blue, Line3: cyan, Line4: green

10) Match each element description option to its HTML5 element

A <main>
B <aside>
C <figure>
D <nav>

A: Defines the main content of a document


B: Defines content other than the page content
C: Defines self-contained content
D: Defines navigation links

11) What will be the output of the below code?

let productDetails : [string, number];


productDetails = {"Samsung Galaxy J7", 16,8,"Samsung Galaxy J5", 32};
for(let i=0; i<productDetails.length; i++) {
console.log(productDetails[i]);
}

Compilation Error

12) Identify which of the following Pseudo classes can be applied to


hyperlinks

c) Hover
d) Visited
e) Focus

13) <html>
<head>
<style>
h1 {color:blue;}
h1,p {color:yellow;}
</style>
</head>
<body>
<p>1</p>
<h1>2</h1>
<p style = "color:green">3</p>
<h1>4</h1>
</body>
</html>
What will be the color of 1,2,3, and 4 when rendered on browser?

1: yellow, 2: yellow, 3: green, 4: yellow

14) ________ means that if we declare a variable (declared but not


initialized) at the end
of a function the runtime when host it to the top and we will not have any
error if we would have used that
variable before being declared

a) Variable hoisting

15) Which of the following options are not predefined pipe?

a) upper
d) datetime

16) Which of the following members can be included in the class?

a) constructor
b) properties
c) methods

17) Chris has created a highlight directive as shown below. What color
will be applied
to the page if he enters yellow in the input field?

//highlight.directive.ts
import {Directive, ElementRef, Input} from '@angular/core';
@Directive ({
selector: ['highlight']
})
export class HighlightDirective {
constructor(el:ElementRef) {
el.nativeElement.style.backgroundColor='blue';
}
}
//app.component.ts
template: `
<label>Provide color to be applied on the page</label>
<input type='text' [(ngModel)] = 'colorName'>
<div highlight>Hello </div>

d) color blue will be applied to the div element

18) Which of the following are the valid properties of Promise Object?
a) state
b) result

19) Which of the following are ES6 features?

c) let and const keyword


d) Arrow functions
e) Template Literals

20) Which of the following are the valid statements with respect to
production builds?

a) Uses AOT compilation


b) Files are tree shaked
c) Source maps are generated
21) What is a proper syntax to construct a module?

a) var variable_name = angular.module("app_name",[]);

22) In order to create a custom impure pipe, you use _______ attribute in
@Pipe decorator

b) pure:false

23) Which of the following options are correct statements to apply the CSS
class 'pink' to the
paragraph element?

a) <p [ngClass]='pink'> background is pink</p>


c) <p [ngClass]='["pink"]'> background is pink</p>

24) class Demo {


a: number = 9;
check() {
if (this.a == 9) {
let n: number = 10;
console.log(this.a);
}
}
}
let demoObject = new Demo();
demoObject.check();

Compilation Error or 9

25) What will be the output of the below code?

let originalstring="Digital!";
let updatedString1=originalstring.substr(2,3);
let updatedString2=originalstring.substring(2,3);
document.write(updatedString1+'<br>');
document.write(updatedString2);

git g

26) Which of the following options will print the details of Bag and Unit
for the below options

let myBag = {
name: "Gucci",
type: "Brand Bag",
price: 2300,
mfgUnit: {
country: "Canada",
quantity: 100,
}
};

function printBagDetails() {
console.log("Name :", this.name);
console.log("Type :", this.type);
console.log("Price :", this.price);
}

function printUnitDetails() {
console.log("Country :", this.country);
console.log("Quantity :", this.quantity);
}

printBagDetails.call(myBag);
printUnitDetails.call(myBag.mfgUnit);

27) Rank the elements of the CSS box model from most inner to outer layer

Content
Padding
Border
Margin

28) What will be the output of the below code?

let noOfWeakendsWorked=2;
let compoffEligibilityStatus;
(noOfWeakendsWorked>0) ?
compoffEligibilityStatus = "You are eligible to avail compOff":
compoffEligibilityStatus = "You are not eligible to avail compOff";
console.log(compoffEligibilityStatus);

You are eligible to avail compOff

29) What will be the output of the below code?

let birth_date = new Date("1993-12-11");


console.log("Boolean of null is ", Boolean(null));
console.log("Boolean of ' ' is ", Boolean(""));
console.log("Variable date cast to Boolean is ", Boolean(birth_date));

Boolean of null is false


Boolean of ' ' is false
Variable date cast to Boolean is true

30) What is the output of the below code.

<html>
<script>
function remove() { console.log('Remove1 code') }
function remove() { console.log('Remove2 code') }
function remove() { console.log('Remove3 code') }
</script>
<body>
<button onclick="remove()">Remove</button>
</body>
</html>

Error - JavaScript does not support function overloading mechanism.

31) Which of the following is true about border property?

b) border will not appear if border style is not specified.

32) What would be the color of Sample1, Sample2 and paragraph when the
below web page is rendered
on the browser?

<html>
<head>
<style>
h1#id1 {
color:red;
}
p#id1 {
color:blue;
}
</style>
</head>
<body>
<h1 id="id1">Sample1</h1>
<h1 id="id1">Sample2</h1>
<p id="id1">Paragraph</p>
</body>
</html>

Red, red and blue respectively

33) What will be the output for the following code?

function fun(...input) {
let sum = 0;
for(let i of input) {
sum+=i;
}
return sum;
}
console.log(fun(1,2));
console.log(", "+fun(1,2,3));
console.log(", "+fun(1,2,3,4,5));

3,6,15

34) Which of the following are the valid HTML5 input types?

c) time
d) number

35) What will be the output of the below code?


<html>
<body>
<script>
var str1 = "John";
var obj1 = new String("John");
console.log("Type of str1 : ", typeof str1);
console.log("Type of obj1 : ", typeof obj1);
console.log("Is str1 == obj1 : ", str1 == obj1);
console.log("Is str1 === obj1 : ", str1 === obj1);
</script>
</body>
</html>

Type of str1 : string


Type of obj1 : object
Is str1 == obj1 : true
Is str1 === obj1 : false

36) Which are the built-in browser validation features?

a) max
b) minlength
e) required

37) Rest parameters are used when _______ .

c) number of parameters are not known

38) Which of the following will map the name of an input parameter
"studentInfo" to a field named "students"?

a) @Input('studentInfo') students

39) Given the HTML structure below, which selector will select both the
span elements?

div class="outerDiv">
<span id="span1" class="innerSpan"></span>
<span id="span2" class="innerSpan"></span>
</div>

a) div#outerDiv span#innerSpan
d) div.outerDiv span#span1, div.outerDiv span#span2

40) Which of the following attributes controls the valid numeric


boundaries of a range control?

a) min
d) max

41) Consider the below code:

type Color = "green" | "yellow";


type Quantity = "five" | "six";

type ItemOne = `${Quantity | Color} item`;

The code snippet is an example of __________.

b) Template Literals

42) What will be the output of the below code?

function greatUser(isLoggedIn:boolean) {
if(isLoggedIn) {
let message = "Welcome to ES6";
}
return message; }
console.log(greatUser(true));
console.log(greatUser(false));

c) Error in greetUser()

43) The <article></article> and <section></section> tags are new to HTML5.


Identify the true statements that describes how each is used in HTML5.

d) Article elements or tags in HTML5 can be used as RSS syndication and


appled to dynamic content such as forum posts, blog posts, comments
and new stories
e) The Section tag in HTML5 defines and isolated sections or logical
chunks of content in a document such as an introduction header or
footer.

44) What will be the output for the following code?

let prices = new Array(67, 23, 90, 67, 12, 73);


prices.push(110);
prices.unshift(43);
prices.pop();
prices.unshift(89);
prices.shift();
console.log(prices);

[43, 67, 23, 90, 67, 12, 73]

45) Which of the following are the valid properties of XMLHttpRequest


object?

a) readyState
b) status

46) Which of the following Pseudo elements can we use to manage styles on
HTML documents?

a) first-line
b) first-letter
47) Keith wants to apply margin property to an element with top-margin
value of 30px bottom-margin value of 20px
and left and right margin value of 25px. Which among the following will
help her in achieving the requirement?

d) margin: 30px 25px 20px

48) The _______ tag defines an alternative content to be displayed to


users that have disabled scripts in their browser
or have a browser that doesn't support script.

c) <notscript>

49) Which of these operations are permitted if you apply Object.freeze()


on myObject?

a) Adding a property to a nested object in myObject


d) Modifying a property of a nested object in myObject

47) Describe some of the essential objectives of the Font-face property.

b) Font-face property allows us to link to the fonts that are


automatically fetched
d) Font-face property allows us to use multiple @font-face rules to
condruct font families

48) Predict the output for the below code snippet.

class Cube {
width;
height;
length;
}

let cube1 = new Cube();


let cube2 = new Cube();
cube1.height = 1;
cube1.length = 2;
cube1.width = 1;
cube2 = cube1;
console.log(cube2.height);

49) What will be the output for the following code?

function fun(...input) {
let sum = 0;
for(let i of input) {
sum += i;
}
return sum;
}
console.log(fun(1,2));
console.log(", "+fun(1,2,3));
console.log(", "+fun(1,2,3,4,5));

3,6,15

50) What will be the output for the following code?

function add(n1:number, n2:number):number {


let total:number=n1+n2;
return true;
}
console.log(add(5,2));

7 or Compilation Error

51) What will be the output of the following code?

let items = [
{ name: "Cake", price: 360 },
{ name: "Vegetables", price: 500 },
{ name: "Drinks", price: 410 }
];

let totalExpensive = items.filter(i => i.price >= 400);


console.log(totalExpensive.reduce((sum, i) => sum + i.price, 0));

910

52) Given the following object, which of the following options are valid
ways to access its "area" property?
var country = {name: "Egypt", area: 1010408, population: 99581200}

a) country["area"]
b) country.area

53) Which of the following are the features of HttpClient service?

a) The ability to request types response objects.


b) Streamlined error handling
c) Request and response interception

54) What will be the output of the following code?

<html>
<head>
<script> function User(name, age) { this.name = name; this.age =
age; }
var user = new User('Daniel', 45);
document.write(user[name] + ' ' + 'is' + ' ' + user[age] + ' ' +
'years old');
</script>
</head>
<body>
</body>
</html>

d) Error - age is not defined

55) Which of the following is a valid arrow function?

a) let sum = (x:number, y:number)=>x+y


b) let sum() = (x:number, y:number):number=> x+y

56) What is the output of the following code?

<html>
<script>
var check = 'a';
switch(check) {
case 'A': document.write('Lower and Uppercase letters are same
for JavaScript');
case 'a': document.write('Lower and Uppercase letters are
different for JavaScript');
default: document.write('Lower and Uppercase letters cannot be
compared in JavaScript');
}
</script>
</html>

Lower and Uppercase letters are different for JavaScriptLower and


Uppercase letters cannot be compared in JavaScript

57) What will be the output of the following code?

function add(num1:number, num2?:number) {


if(num2) {
return num1+num2;
}
return num1;
}
console.log(add(3,5)+add(5)+add(3));

16

58) What will be the output when AppComponent is rendered on the browser?

app.component.ts:
import { Component } from '@angular/core';
@Component ({
selector: 'app-root',
templateUrl: './app.component.html',
template: `Welcome to {{course}}`
})
export class AppComponent {
salutation = "Hello";
course = "Angular";
}
app.component.html:
{{salutation}} {{course}}

c) Welcome to Angular

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++

1) What is the output of below code:

using System;
class Program {
static void Main(string[] args) {
try {
Console.WriteLine("Hello");
}
catch (ArgumentNullException) {
Console.WriteLine("A");
}
catch (Exception) {
Console.WriteLine("B");
}
finally {
Console.WriteLine("C");
}
Console.ReadKey();
}
}

Hello
C

2) ______ section in package.json is used to defined the dependencies the


module needs to run in development phase.
devDependencies

3) _______ decorator is used to indicate that the DI is optional

@Optional

4) Custom Serialization can be created by implementing ______

Iserializable

5) Choose the options that fall under OPEX.

a) Consumption based Model


b) Scaling charges based on usage/demand

6) Most documents will likely have the <body> section divided into
different sections.
Select the tags from the code except below that are generally used to
enclose navigator elements.

<html>
<head>
<title>Basic Document Structure</title>
</head>
<body>
<nav></nav>
<article></article>
</body>
<html>

<nav></nav>

7) The _______ attribute is an indication that a class containers test


methods. When you mention this attribute to a class in your project,
the Test Runner application will scan it for test methods

[TestFixture]

8) In the Code-First approach, __________

c) EF creates a database and schema from domain classes

9) How do you return multiple models on a single view in ASP.Net MVC?

a) View()
b) ViewModel
c) Partial views
d) Sessions
e) All of the above

10) _______ provider is used for dynamic dependency injection

f) FactoryProvider

11) What is the output of the following code?

import { Component, OnInit } from '@angular/core';


function hello() {
alert('Hello!!!');
}

@Component ({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent implements OnInit {
name = 'hi Angular';
ngOnInit() {
hello()
}
}

hello message is displayed

12) Choose the participants of BDD.

a) Developer
b) Customer

13) Choose the features supported by ADO.Net Entity Framework

d) Automatic synchronization and code regeneration if the database schema


changes

14) What is the output code.

using System;
class Program {
static DateTime time;
static void Main(string[] args) {
Console.WriteLine(time == null ? "time is null" : time.ToString());
}
}

display default date and time

15) _______ decorator is used to specify to the DI Provider to ignore


current component's provider and
consider parent component's provider.

@SkipSelf

16) Choose the invalid statements w.r.t ADO.Net Entity Framework

a) It works only with SQL Server Database


b) To maintain the relation it generates a .dbml

17) ______ is used to avoid name collisions in dependency injection

c) InjectionToken or @injectable

18) Consider the below code:

int a=10, b=5, c;


if(a>b)
c=b;
else
c=a;

How do you rewrite the above code using ternary operator?

a) c=a>b ? b:a;
19) ______ section in package.json is used to defined the dependencies the
module needs to run in production phase.

dependencies

20) What is the output of the following code?

import { Component, OnInit } from '@angular/core';


function hello() {
alert('Hello!!!');
}

@Component ({
selector: 'my-app',
templateUrl: `
<h1>Hello from {{ name }}!</h1>
<input type="button" value="click here" (click)="hello()">
})
export class AppComponent implements OnInit {
name = 'hi Angular';
}

c) hello function is never called, so nothing happens

21) Consider the below code

// method difinition
void ShowData (int param1, string param2, int param3) {}

Which of the following is valid method invocation?

b) ShowData (12, param2: "Hello", 3);


c) ShowData (param3: 45, param1: 34, param2: "Hello");

22) Choose the options that fall under CAPEX.

a) Networking costs
b) Server Costs

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++

1) function show() {
console.log('show function called');
}
show.call();

show function called

2) using System;
class HelloWorld {
static void Main(string args[]) {
int[] a = {10,20,30,40,50,80};
Console.WriteLine(a[-1]);
}
}

exception will be thrown

3) import { Component } from '@angular/core';


@Component({
templateUrl: './app.sample.component.html',
})
export class SampleworldComponent {}

What happens when you run the application that uses above component?

c) Application will run successfully without any errors

4) console.log(null == undefined)

true

5) var a = 90;
doit();
function doit() {
console.log(a);
var a = 10;
}

undefined

6) A special instruction on how ASP.NET should process the page is


a……..

d) Directive

7) Which of the following options is not defined as a type of cloud


deployment model?

b) Distributed Cloud

8) Which statement about the this keyword is not true?

b) A constructor can use a base statement and a this statement if the base
statement comes first.

9) What is the output of below code:


console.log(4 + undefined);

NaN

10) What happens when you try to create a component by running the below
command?
ng g c 3helloworld

Error
11) Which of the following statements are true w.r.t abstract classes in
C#?
a) You cannot create an object of abstract class
b) An abstract class can never be sealed or static

12) import { Component } from '@angular/core';


@Component({
selector: 'my-cmp'
})
export class SampleworldComponent {
}

What happens when you run the application that uses above component?

d) You will get a compile time error

13) Lets say, you want to align an element both vertically and
horizontally at the center of its parent element, which CSS positioning is
the best suited?
a) absolute

14) What is the maximum blob soft delete retention period?


d) 365 days

15) Which of the following statements are correct w.r.t enums?


a) Enums are used to initialize variables
b) They are used to define constants
c) Enums cannot be inherited

16) Lets say, you want to select first <p> element that is placed
immediately after <div>
and display in yellow, Which css selector do you use?

<div>
<p>This is Paragraph 1 </p>
<p>This is Paragraph 2 </p>
<section><p> This is Paragraph 3.<p></section>
</div>

<p>This is Paragraph 4.</p>


<p>This is Paragraph 5</p>

d) <style>
div + p {
background-color: yellow;
}
</style>

17) import { Component } from '@angular/core';


@Component({
selector: 'app-root',
templateUrl: `<p>Today is {{today | date:'short'}}</p>`,
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'hello-world';
today: Date = new Date('29-March-2019');
}

e) Today is 3/29/19, 2:11 PM

18) Lets say, you want to select all <p> elements that are inside <div>
and display in yellow,
Which css selector do you use?

<div>
<p>This is Paragraph 1 </p>
<p>This is Paragraph 2 </p>
<section><p> This is Paragraph 3.<p></section>
</div>

<p>This is Paragraph 4.</p>


<p>This is Paragraph 5</p>

f) <style>
div p {
background-color: yellow;
}
</style>

19) The below code is interpreted as

p {
margin: 25px 50px 75px 100px;
}

a) top margin is 25px


right and left margins are 50px
bottom margin is 75px

20) Lets say, you want to select all <p> elements that are the children of
<div> and display in yellow,
Which css selector do you use?

<div>
<p>This is Paragraph 1 </p>
<p>This is Paragraph 2 </p>
<section><p> This is Paragraph 3.<p></section>
</div>

<p>This is Paragraph 4.</p>


<p>This is Paragraph 5</p>

b) <style>
div > p {
background-color: yellow;
}
</style>
21) What is the output of below code:
using System;
public class HelloWorld {
static string location;
public static void Main(string[] args) {
Console.WriteLine(location == null ? "location is null" :
location);
}
}

location is null

22) What will be the output of the following code?


function show() {
console.log('show function called');
}
new show();

show function called

23) When html elements are positioned with _____ attribute, they aren't
affected by positional
attributes such as top, bottom, left or right.

c) static

24) The binary search method needs no more than ______ comparisons
a) (log2n) + 1

25) In Angular 15, how do you generate a component using cli command
without creating its spec file?
b) ng generate component Login --skipTests=true

26) Below code is an example of _____


int[][] myArray = new int[3][]

c) jagged array

27) In the below code, what styles will be applied to which elements?
section {
color: gray;
}
<section>
<p>paragraph</p>
<a href="#">link</a>
<section>

d) Only the paragraph will be gray

28) What is the output of following code?

using System;
public class Shape {
public virtual void Draw() {
Console.WriteLine("Drawing a shape.");
}
}

public class Circle : Shape {


public new void Draw() {
Console.WriteLine("Drawing a circle.");
}
}

Shape myShape = new Circle();


myShape.Draw();

Drawing a Circle

29) Which member function does not require any return type?
Constructor and destructor

30) Hiding the implementation complexity can be useful for ________


e) Make the programming easy

31) ______ is the default positioning for HTML elements


f) static

32) Lets say you want to call Child Component's method from Parent
Component. Which of the following is used?
a) Dependency Injection
b) @ViewChild decorator

33) Lets say you want to apply CSS, Javascript and Validate some code
inside a Component
Which of the following is best suited for implementing this?
c) Directives

34) Which of the following are correct w.r.t readonly keyword


a) A readonly field can be initialized multiple times within the
constructor(s)
d) If you declare a non-primitive types (reference type) as readonly only
reference is immutable not the object it contains.

35) Which of the following default class is used to configure all the
routes in MVC?
RouteConfig

36) "use strict"


function WhatsYourName() {
username = "Marie"
console.log(username)
}
WhatsYourName();

e) Error
37) Which CSS properties can you use to create a rounded corner on just
the top-left and top-right corners of an element?
a) border-radius: 10px 10px 0 0;
b) border-top-left-radius: 10px; and border-top-right-radius: 10px;

38) What will be the output of the following code?


console.log(null === undefined);

false

39) Lets say you want to create charts and display them in the
application.
Which of the following is best suited for developing this?

c) Directives

40) Which of the following is a non-linear data structure?


d) Trees

41) In case of ______ positioning, element remains locked to the viewport,


regardless of
page scrolling. It stays in the same place even when the page is scrolled.
d) fixed

42) let obj = {


a: 10,
saySomething : function() {
x();
function x() {
console.log(this.a);
}
}
}
obj.saySomething();

undefined

43) Lets say you want to run the application on different port.What
happens when you try
to run the below command?
ng serve --port:8888 --open

e) Error message will be display

44) import { Component } from '@angular/core';


@Component({
selector: 'app-root',
Template:`<p>Today is {{today | date:'short'}}</p>`,
StyleUrls: ['./app.component.css']
})
export class AppComponent
{
title = 'my-app';
today: Date = new Date('29-March-2019');
}

f) Today is 3/29/19, 2:11 PM

45) int[,] arrayInitialization = {{1,2},{3,4},{5,6},{7,8}};


g) two dimensional array

46) You are implementing a data structure, where in you want to store keys
which are strings, and you want
to store values associated with the keys, which are also strings. There
can be multiple values associated with a key.
What class would you use to minimize the development effort, while at the
same time maximizing efficiency?
h) NameValueCollection

47) Which of the following are correct w.r.t const keyword


a) We must assign const field at time of declaration
b) Const in C# is static by default
c) Const field can not be passed as ref or out parameter

48) The below code is interpreted as


p {
margin: 25px 50px
}
a) top and bottom margins are 25px
right and left margins are 50px

49) The body of your page includes below some sections. How will it look
with the following CSS applied?
body {
background: #ffffff; /* white */
}
section {
background: #0000ff; /* blue */
height: 200px;
}

d) blue sections on a white background

50) What happens when you try to create a component by running the below
command?
ng g c hello-3-world

Component by name Hello3World gets created

51) function addNums (num, num) {


console.log(num + num)
}
addNums(2,3);

52) lets say you want to implement custom sort feature into your Angular
application. This functionality has to be reuseable
across the project Which of the following option is best suited for
implementing this?

Services and DI

53) What is the goal of the continuous delivery

O deploy new code with minimal effort

54) let obj = {


name: "Sam",
sayLater: function() {
setTimeout(function() {
console.log(`${this.name}`);
}, 1000);
}
};
obj.sayLater();

undefined

55) ….…method of the custom action filter is method is called before a


controller action is executed

OnActionExecuting

56) Choose the valid statements w.r.t BDD


the starting point is a scenario.
It is a team methodology.

57) The term …….refers to a geographical location or area

Regions

58) Which of the following is a incorrect life cycle hook?

ngOnViewInit

59) ….…event is used to load ViewState of all controls

LoadComplete

60) Which of the following statements are valid w.r.t Serialization?

b) in Binary serialization, the class should have default constructor


c) Binary serializer can serialize protected members

61) Which of the following is a common challenge in implementing


continuous integration?

a) Difficulty in integrating code from different developers

62) ….…acts as both an Observable and an Observer.


Subject

63) Which of the following are the escape sequences in C#

\\

64) Custom Serialization can be created by implementing…..


ISerializable

65) How can you use the HttpClient to send a POST request to an endpoint
from within an addOrder function in this OrderService?

export class OrderService {

constructor (private httpClient: HttpClient) {}

addOrder (order: Order) { // Missing line


}
}

this.httpClient.post<Order>(this.orderUrl, order).subscribe();

66) What is an alternative way to write this markup to bind the value of
the class field userName to the ht element title property?
<h1 [title]="userName">Current user is (userName })</h1>

title="{{ userName }}"

67) Choose the participants of BDD

Developers
Customers
Project Manager

68) Which of the following keyword should be prefixed to a member of the


base class to allow overriding in the derived class?

virtual

69) Which of the following statements are valid?

In XML serialization, the class should have a default constructor.


Data serialized in XML serialization is easily readable.

70) The acts as a placeholder that marks the spot in the html template
where the components' output will be displayed

Router Outlet

71) Based on the following component, what template syntax would you use
to bind the Tale Card Component's title Text felt to the ht element the
property?

@Component{{
selector: 'app-title-card' ,
template:'<h1 title="User Data"> {{titleText}}</h1>',
}}
export class TitleCardComponent{
titleText = 'User Data';
}

<h1 [title]="titleText">{{ titleText }}</h1>

72) Based on the following usage of the async pipe, and assuming the users
class field is an Observable, how many subscriptions to the users
Observable are being made?
<h2>Names</h2>
<div *ngFor="let user of users | async">{{ user.name }}</div>
<h2>Ages</h2>
<div *ngFor="let user of users | async">{{ user.age }}</div>
<h2>Genders</h2>
<div *ngFor="let user of users | async">{{ user.gender }}</div>

Three. There is one for each async pipe.


There will be one for each async pipe, the code above results in 3
subscriptions

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+

1) .......event is used to load ViewState of all controls

LoadComplete

2) group of services are used to develop and deploy the application on


cloud platform.

PAAS

3) Choose the options that fall under OPEX

Consumption based Model


Datacenter infrastructure costs
Scaling charges based on usage/demand

4) adjusts how the characters are displayed on the web page

font-family

5) event is used to set Themes dynamically

Prelnit

6) What is the default access modifier of C# class?

internal
7) Based on the following usage of the async pipe, and assuming the users
class field is an Observable, how many subscriptions to the users
Observable are being made?
<h2>Names</h2>
<div *ngFor="let user of users | async">{{ user.name }}</div>
<h2>Ages</h2>
<div *ngFor="let user of users | async">{{ user.age }}</div>
<h2>Genders</h2>
<div *ngFor="let user of users | async">{{ user.gender }}</div>

There will be one for each async pipe, the code above resust in 3
Subscriptions

8) What parameter would change a website's background imagen CSS7

Obackground-image

9) In Reactive forms, which of the following Angular form class type is


used <form> element to wire up?

FormGroup

10) event is used to set master page dynamically

Prelnit

11) The ______ acts as a placeholder that marks the spot in the html
template where the components' output will The be displayed acts as a
placeholder that marks the spot in the html template where the
components' output will
be displayed.

Router Outlet

12) are physically separate locations within a region

Avaliability Zones

13) Which of the following are the escape sequences in C#


\N \t \\

14) Which of the following is NOT a benefit of continuous integration?

Reduced server load

15) You are implementing a data structure, where in you want to store
keys which are strings and you want to store values associated with
the keys, which are also strings.

There can be multiple values associated with a key. What class would you
use to minimize the development effort while at the same time maximizing
efficiency?
NameValueCollection

16) Which of the following is a incorrect life cycle hook ?

OngOnViewInit

17) acts as both an Observable and an Observer

Subject

18) Which of the following are valid w.r.t WebAPI

Web API can be self-host


Web API can be host in IIS
Web Api is supported JSON and XML file format

19) Complete the below code to get the button in Tahoma font

import (Component) from '@angular/core'


@Component(( selector app-root
template <div>
<button style='color.red'
</button>
</div>
})
export class AppComponent { IsValid: boolean = true;
}

[style font-family]="IsValid ? "Tahoma": 'Arial">Click Me

20) Which of the following statements are valid w.r.t Serialization?

in Binary serialization, the class should have default constructor

Binary serializer can serialize protected members

21) event is used to load postback data

LoadComplete

22) How can you disable the submit button when the form has errors in
this template-driven forms example?
<form #userForm="ngForm">
<input type="text" ngModel name="firstName" required />
<input type="text" ngModel name="lastName" required />
<button (click)="submit(userForm.value)">Save</button>
</form>

<button (click)="submit(userForm.value)"
[disabled]="userForm.invalid">Save</button>

23) Which of the following statements are valid ?

in XML serialization, the class should have default constructor


data serialized in xml serialization is easily readable

24) What property will allow you to rotate an object in an HTML5


documents

transform: rotate

25) Choose the valid statements w.r.t BDD

the starting point is a scenario.


It is a team methodology.

26) What is an alternative way to write this markup to bind the value of
the class field userName to the h1 element title property?
<h1 [title]="userName">Current user is {{ userName }}</h1>
l [title]="userName">Current user is ((userName ))</h1>

title="{{ userName }}"

27) event takes place before saving ViewState, so any changes made nere
are saved

PreRender

28) Based on the following component, what template syntax would you use
to bind the TitleCardComponent's titleText field to the h1 element
title property?
@Component({
selector: 'app-title-card',
template: '<h1 title="User Data"> {{titleText}}</h1>',
})
export class TitleCardComponent {
titleText = 'User Data';
}

<h1 [title]="titleText">{{ titleText }}</h1>

29) What parameter would allow text to be wrapped around an image in CSS?

Ofloat

30) ______ event is raised at the end of the event-handling stage

LoadComplete

31) What coding convention is missing from the code snippets belo that
would complete the code for an inline style

Select the option to complete this snippet of code so that the hotation
accuratele esents an inline style in an HTML5 document.

<p class="boldpara" style=color: #0026ff; font-famil: courierfont-weight


normal; font-size: 16pt; >
32) Which of the following is not a builtin ActionResult

FileResult

33) Same as 28

34) Which of the following properties returns a geolocation object in


HTML5?

Onavigator.geolocation

35) How can you use the HttpClient to send a POST request to an endpoint
from within an addOrder function in this OrderService?
export class OrderService {
constructor(private httpClient: HttpClient) {}

addOrder(order: Order) {
// Missing line
}
}

this.httpClient.post<Order>(this.orderUrl, order).subscribe();

36) Custom Senalization Formatters can be created by implementing

Iformatter

37) Azure Regions comprises of

Avaliability Zones

38) Choose the valid statements w.r.t IAAS

provides dynamic scaling

enables developers to deploy applications

39) What is an alternative way to write this markup to bind the value of
the class field userName to the h1 element title property?
<h1 [title]="userName">Current user is {{ userName }}</h1>

title="{{ userName }}"

40) method of the custom action filter is method is called before a


controller action is executed

OnActionExecuting

41) The term refers to a geographical location or area

Regions
42) How can you disable the submit button when the form has errors in
this template-driven forms example?

<form #userForm="ngForm">

<input type="text" ngModel name "firstName" required />


<input type="text" ngModel name "lastName" required />
<button (click)-"submit(random value)">Save</button>
</form>

<button (click)="submit(userForm.value)"
[disabled]="userForm.invalid">Save</button>

43)

44)

45) Choose the options that fall under CAPEX

Networking costs

Server Costs

46) is used for block-level storage volumes for Azure VMs

Azure Disks

47) can affect whether the text appears centered, left justified or night
justitied

text-align

48) Which storage is used to store huge amounts of unstructured data in


Azure?

Azure blob storage

49) Custom Serialization can be created by implementing

Iserializable

50) When does structure variable get destroyed?

As variable goes out of the scope

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

==========================================================================

Previous final questions:


--------------------------
1) Which of these is an attribute that you can apply to a
controller action or an entire controller that modifies the way
in which the action is executed?

ActionFilters

2) ........is a measure of how much of the code in a software


application is covered by automated tests.

Code Coverage

3) ou want to add a key value pair to a HashTable Table.


However, you need to make sure that the key doesn't already
exist in the HashTable. What code could you use?

If (!table TryAdd(key, value)) //key exists

4) .......command is used to determine the version of node.js installed

node -v

5) …..is the CI/CD process which area to allows developers to


work independently, creating their own coding "branch" to
implement small changes

continuous integration

6) Which of the following is not a part of Docker Architecture?

Docker Machine

7) ….…..protect your Azure Virtual Network resources

Azure Network Security Groups

8) When break statement is used inside two nested for loops,


does control come out of the inner for loop or the outer for loop?

It breaks from only the inner loop.

9) Which feature of OOP reduces the use of nested classes?

Inheritance

10) what is the difference between Continuous delivery vs


continuous deployment?

Continuous Delivery software in always release ready with


manual approval, while Continuous Deployment automates the
release process.

11) ….….gives you application-level routing


Azure Application Gateway
12) …...is the process of creating objects that simulate the
Mocking

13) Which is NOT true about a read-only variable?

It can be initialized at declaration only.

14) Bundling allows……..

Loading of multiple script files in single request

15) Which of the following is TRUE ?

Action method must be public method in a controller class.

16) You are analyzing the navigation options currently


available for your web site before deciding how to remap the
HTML links. Each page will need to have a null link to keep
the navigation menu consistent.
Identify the code that shows the correct syntax for a null
navigation link for the web page.
<html>
<head></head>
<body>
<a href="#">home</a><br>
<a ref="about.html">About Us</a><br>
<a href="careers.html">Careers at Diallonics</a><br>
<a href="contact.html">Contact Us</a><br>
</body>
</html>

(D)
<a href="#">home</a><br>

17) What other template syntax (replacing the ngClass


directive) can be used to add or remove the CSS class names
in this markup?
<span ([ngClass]="{ 'active': isActive, 'can-toggle': canToggle)">
Employed </span>

B) <span [class.active]="isActive" [class.can-toggle]="canToggle">


Employed </span>

18) What is the output of the following code


public class Program
{
static void Main(string[] args)
{
int i = 13;
i= --1 - i--;
Console.WriteLine(i);
Console.ReadLine();
}
}

==========================================================================
====

Phase: 4
---------

Phase - 4:
==========
1) Why do Azure storage accounts have two access keys?
To periodically rotate one key while the other remains unchanged

2) What is a Container?
Create an instance of an image

3) attribute marks a method that is executed after each test, allowing


you to clean up any resources or restore the system to its original
state.
â—‹ [TearDown]

4) docker command shows running containers


docker ps

5) is a tool for defining and running multi-container Docker


applications.
Docker Compose

6) Which cloud computing characteristic is the most closely related to


OPEX?
Metered usage

7) gives you application-level routing and load balancing services that


let you build a scalable and highly- available web front end in Azure
Azure Application Gateway

8) Which of the following best describes continuous integration?


A technique for continuously testing and deploying code

9) You have a .NET app running on a VM Scale set. You need to monitor
application performance without modifying the code. The solution should
minimize the cost. What should you do?
Install the Application Insights Agent.

10) Azure Blob storage provides for which of the following?


Storage service for very large objects such as video files or bitmaps

11) Testing the end to end functionality of the system as a whole is


defined as
Functional Testing

12) Which of the following is not a part of Docker Architecture ?


Docker Machine

13) You need to host a website that mainly contains static content,
including HTML, CSS, and a few pages with client-side JavaScript. The site
contains no sensitive information, and CORS support is unnecessary. You
have limited funds to pay for hosting, so the solution should be as
inexpensive as possible. Which option should you use?

Azure Static web apps

14) measures the extent to which the source code is exercised by tests.
It
helps identify areas of the code that are not adequately tested
Test Coverage

15) What is the purpose of unit testing in continuous integration?


To test the functionality of individual code components

==========================================================================
=========

1) Which of the following is class represents an entity set?


ODbSet

2) is used to specify the default route


[Route]

3) Which of the following code is used to add a partial file called as


"_Header.cshtml"?
@Html.Partial("_Header")

4) Choose the valid statements


>NULL values are ignored for all the aggregate functions.
>When an aggregate function is included in the SELECT clause, all other
expressions in the SELECT clause must either be aggregate functions or
included in a GROUP BY clause.

5) Which of the following method of DbContext is used to save entities to


the database?
SaveChanges()

6) Suppose there are multiple code based migrations applied to your


database but you want to roll back to the first migration. Then you
need to execute the command.
Update-Database

7) Use in a variable. when you do not have a model to send to the view
and have a lot of html to bring back that doesn't need to be stored
@Html.RenderAction

8) SELECT CHARINDEX('DOT%', 'DOTNET') AS 'CharIndex'


0

9) is used to generate the client-side HTML and scripts that are


necessary to properly display a control at the browser level:
Render

10) The attribute allows you to vary the cached output depending on the
query string.
VaryByParam

11) How do you pass multiple models from a controller to the single view?
>ViewBag

12) You can set a common prefix for an entire controller by using the
attribute:
[RoutePrefix]

13) What is the result of this query?


SELECT 1/2 AS Result;
0

14) is used to represent Message Handlers before routing in Web API


DelegatingHandler

15) renders what is given without doing any html encoding


Html.Raw

16) Choose the valid statement/s w.r.t SERIALIZABLE isolation level?


>it protects against phantom reads
>it causes highest level of blocking

17) To enable attribute based routing method is used


MapMvcAttributeRoutes

18) command enables code based migration for Entity Framework


Enable-Migrations

19) Below route constraint applies to ("users/(id:int: min(1))")


>all requests like /users/6

20) Choose the valid statements w.r.t Left Outer Join


c) it returns records having no matching values in the right table
d) it returns records having null values

21) In the Code-First approach,


EF creates entity classes and database from domain classes.

22) Data Annotations attribute can be used to define a primary key


property.
[Key]

23) Ado. Net EF, you can insert data into your database tables during the
database initialization process. You need to create a custom DB
initializer that derives from class
a) DropCreateDatabaseAlways<DBContext>

24) is used to specify optional parameters in attribute based Routes


? or id

25) Assuming the following query is executed on 31st Dec 2011. What is the
result of the below query. SELECT CONVERT(varchar(30), GETDATE(), 111) AS
Expr1
31/12/2011

26) In ADO.NET Entity Framework, the physical storage structure of the


database, including tables, columns, primary keys, foreign keys, and other
database-specific elements, is defined using:
OSSDL (Storage Schema Definition Language)

27) You can create a custom ActionResult by deriving from


ActionResult

28) Choose the invalid statements w.r.t ActionMethods in MVC


>Action method can contain ref and out parameters.
>Action method can be an extension method

29) method is used to force all the validation controls to be executed


Page.Validate()

30) In case of locks are honored isolation level of transaction, dirty


reads are possible, meaning that no shared locks are issued and no
exclusive
ReadUncommitted

31) is used to force all the validation controls to run and to perform
validation.
ModelState.validate()

32) In case of the database a row (or a record) is unavailable to other


users from the time the record is fetched by user until it's updated in
Pessimistic concurrency

33) The clause combines all those records that have identical values in a
particular field or any collection of fields.
group by

34) Lets say you want to track the IP address of the users for your
Asp.Net MVC application. You can implement this by using
Filters

35) There are occasions when you want to abort a portion of transaction,
but not all of it. There are occasions when you want to abort a portion of
transaction, but not all of it. For this you use
Savepoint

36) In case of ACID properties, event of power loss, crashes, or errors.


property ensures that once a transaction has been committed, it will
remain so, even in the
Durability

37) Choose the datatypes that Blob can be referred to


images
text
byte

38) You can have number of RenderBody() method in Layout Page


1. only

39) block in web config file sets the user-defined values for the whole
appSettings

40) What does the @@ROWCOUNT function return in SQL Server?


a) The number of rows affected by the last query

41) In case of in the database. a row (or a record) is unavailable to


other users from the time the record is fetched by user until it's updated
Pessimistic concurrency

42) [HandleError] is an example of


Filters

43) event is used to set master page dynamically


PreInit

44) In case of isolation level of transaction, shared locks are held while
the data is being read to avoid dirty reads,
but the data can be changed before the end of the transaction, resulting
in non-repeatable reads or phantom data.
ReadUncommitted

45) How can you select all the even number records from a table?
Select from table where id % 2 = 0;

46) is the cache policy where the cache expires at a fixed specified date
or time
Absolute Expiration

47) has no corresponding built-in schema


UnTyped DataSet

48) event is used to read or initialize control properties


Init

49) Lets say you want to display ADS to the users for your Asp.Net MVC
application. You can implement this by using
Tag Helpers

50) are used to define the degree to which one transaction must be
separated from resource or data modifications made by other concurrent
transactions
IsolationLevels

51) Choose the disadvantages of ViewState in Asp.Net


a) Data transfer between pages is not possible using ViewState.
d) ViewState ensures security as data is stored in an encrypted format.
52) is the default isolation level in Ado. Net Transactions
Serializable
READ COMMITTED

53) When you want a method in a controller not to be treated as action


method, you need to decorate with
[NonAction]

54) event is used to set Themes dynamically


PreInit

55) is the default http server for Asp.net core applications


Kestrel

56) enables one to follow the execution path of a page, debug the
application and display diagnostic information at runtime
Tracing

57) Web API Controller derives from


ControllerBase

58) In case of ACID properties, property ensures that any transaction will
bring the database from one valid state to another
Consistency

59) Choose the valid Session state Modes in ASP.NET?


InProc

60) Lets say you want to display a footer for every page in your Asp.Net
MVC application. You can implement this by using
Layout Pages

61) Which class is used to add / Insert values to a Identity column from
Ado.Net?
SqlCommandBuilder

62) Why do Azure storage accounts have two access keys?


To periodically rotate one key while the other remains unchanged

63) What is a Container?


Create an instance of an image

64) attribute marks a method that is executed after each test, allowing
you to clean up any resources or restore the system to its original
state.
[TearDown]

65) docker command shows running containers


docker ps

66) is a tool for defining and running multi-container Docker


applications.
Docker Compose
67) Which cloud computing characteristic is the most closely related to
OPEX?
Metered usage

68) gives you application-level routing and load balancing services that
let you build a scalable and highly- available web front end in Azure
Azure Application Gateway

69) Which of the following best describes continuous integration?


A technique for continuously testing and deploying code

70) You have a .NET app running on a VM Scale set. You need to monitor
application performance without modifying the code. The solution should
minimize the cost. What should you do?
Install the Application Insights Agent.

71) Azure Blob storage provides for which of the following?


Storage service for very large objects such as video files or bitmaps

72) Testing the end to end functionality of the system as a whole is


defined as
Functional Testing

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++
Web API in C#:
==============

1) Which of these is an attribute that you can apply to a controller


action or an entire
controller that modifies the way in which the action is executed?
Action filter

2) With the latest release of ASP. NET, the following user identities can
be managed:
Cloud, SQL, Local Window active directory.

3) A special instruction on how ASP.NET should process the page is a


Directive

4) Web API, an object that handles HTTP requests is known as a


Controller

5) File extension of ASP.NEt are .aspx, .vbhtml, .cshtml

6) Application state variables are accessed using the


Applications Collection

7) ASP.NET applications hosted by a Web Server and are accessed using


HTTP

8) The features of MVC pattern include:


Originally it was named Thing-Model-View-Editor in 1979, and then it was
later simplified to
Model- View-ControllerIt is a powerful and elegant means of separating
concerns within an
application (for example, separating data access logic from display logic)
and applies itself
extremely well to web applicationsIts explicit separation of concerns does
add a small amount of
extra complexity to an application’s design, but the extraordinary
benefits outweigh the extra effort

9) A built-in attribute, which indicates that a public method of a


Controller is
NonAction

10) ASP -> Active Server Pages

11) ASP.NEt is a Server-side technology

12) ASP.NET Web form is not the part of ASP.NET core

13) CSS, Javascript, AJAX are the technologies are used in ASP.NET

14) web.config file are use to store global information and variable
definition

15) Yes Asp.net webform support an event driven application model


16) MVC stands for Model View Controller

17) ControlToValidate must be set on a validator control for the


validation

18) Content pages are use to depend on the Master Page

19) Every Server control of ASP.NET must have an id

20) Global.asax contain the Application Start event

21) ASP.NET event part are Init, Load

22) Booleans is the return type of IsPostBack property

23) Bin folder is used to store DLL files in the ASP.NET application

24) PreInit is the first event triggered when a user request an ASP.NET
page

25) Counter, AdRotator, File Access are the part of ASP.NET component

26) SQLServer, StateServer are the following Session Mode Serialization

27) The SessionIds are stored in Cookies by ASP.NET

28) Correct Syntax of Assembly directives:


<%@ Assembly Name ="myassembly" %>

29) Correct Syntax of the control directives are,


<%@ Control Language="C#" EnableViewState="false" %>

30) .asmx is the file extension of webservices in ASP.NET

31) HTTP Protocol is use to call a web service

32) Early binding is non virtual method is called which is decided at


compile time

33) Late binding is a virtual method is called and decided at runtime

34) The ____ class is used to summarize the error messages from all
validators on a Web page in a single location.
ValidationSummary

35) Which method is used in ASP.Net to preserve page and control values
between round trips?
View State

36) What is the default timeout for a cookie in ASP.Net?


30 minuties

37) SOAP in ASP.NET is Simple Object Access Protocol


38) The Global.asax file is derived from the ____ class.
HttpApplication

39) Event page in ASP.NET is


Preload, Load, LoadComplete

40) ASP.Net web application run without web.config file

41) Component of ADO.NET:


Dataset
Data Reader
Data Adaptor
Command
Connection

42) In ____ page processing transfers from one page to the other page
without making a round-trip back to the client's browser.
Server.Transfer

43) ____is used to redirect the user's browser to another page or site.
ResponseRedirect

44) Different type of caching ASP.NEt


Outut, Fragment, Data

45) Which of the following tag is used for the HTML checkbox?
<input>

46) Which of the following property is used to set the check state for
ASP.NET CheckBox control?
Checked

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++
==========================================================================
======
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++

ASP.NET Core Test:


==================

1) asp.net is an open source framwork

2) Main methd of Program class is an entry point of asp.net core


application

3) wwwroot is by default static files can be served

4) Program.cs host for asp.net core web application is configured

5) Asp.net core web application uses Kestrel an internal server by


default
6) Every command in .net core command line interface starts with dotnet

7) The startup class must include Configure method

8) ConfigureService method in Startup class is used to registering


services with IOC container

9) Middlewares is executedon each request in ASP.Net Core application

10) Middlewares can be configured using instance of type of


IApplicationBuilder

11) Middlwares can be configured in Configure method of Startup class

12) ASPNETCORE_ENVIRONMENT is a variable in ASP.NET Core application

13) Use Exception Handler extension method allow us to configure custom


error handling route

14) Portable, Self-contained are types of .net core applications

15) self contained application can be installed and run on any platform
without .net core runtime

16) .net standard should target for the code sharing of .net core

17) To create logs in Asp.net core application we need to get


Iloggerprovider object from
IOC container

18) What is Middleware in ASP.NET Core?


A software component that handles HTTP requests and responses

19) What is Dependency Injection (DI) in ASP.NET Core?


A design pattern for writing scalable and maintainable code

20) What is the role of Controllers in ASP.NET Core?


To handle HTTP requests and return responses

21) What is the role of Views in ASP.NET Core?


To generate HTML responses to be sent to the client

22) What is Razor in ASP.NET Core?


A markup language used for creating views in ASP.NET Core

23) What is Entity Framework Core in ASP.NET Core?


An ORM (Object-Relational Mapping) tool used for database access

24) What is the role of appsettings.json file in ASP.NET Core?


To store configuration settings for the application

25) What is the purpose of the Startup.cs file in ASP.NET Core?


To configure the application’s services and middleware
26) What is the difference between IApplicationBuilder and
IWebHostBuilder in ASP.NET Core?
IApplicationBuilder is used to configure middleware, while IWebHostBuilder
is used to configure services

27) What is the purpose of the [Authorize] attribute in ASP.NET Core?


To restrict access to a controller or action to authorized users only

28) What is the purpose of the [AllowAnonymous] attribute in ASP.NET


Core?
To allow anonymous access to a controller or action

29) What is the purpose of the [Route] attribute in ASP.NET Core?


To specify the URL path for a controller or action

30) What is the purpose of the [HttpGet], [HttpPost], [HttpPut], and


[HttpDelete] attributes in ASP.NET Core?
To specify the HTTP verb that a controller or action responds to

31) What is the purpose of the HttpClient class in ASP.NET Core?


To handle HTTP requests and responses

32) What is the purpose of middleware in ASP.NET Core?


To perform custom logic on HTTP requests and responses

33) What is the name of the Page object’s property that determines if a
Web page is being requested without data being submitted to server?
IsPostBack

34) _____________ is the DataType return in IsPostback property.


boolean

35) When does Garbage collector run?


When application is running low of memory

36) Which is the first event of ASP.NET page, when user requests a web
page
Preinit

37) What happens in the Init event of a page?


Each child control of the page is initialized to its design time values.

38) Which validation control in ASP.NET can be used to determine if data


that is entered into a TextBox control is of type Currency?
CompareValidator

39) You can add more than one master page in a website.
b. Master page can be nested.

40) Which of the following statements about referencing master page


methods and properties is true?

All of the above


41) How many types of authentication ASP.NET supports?
a. Windows Authentication.
b. .NET Passport Authentication.
c. Forms Authentication.

41) Which of the following is the default authentication mode for IIS?
Anonymous

42) You use the ASP.NET Web Site Administration Tool to configure ASP.NET
membership with forms authentication. What should you name your login form
so that you do not have to modify the Web.config file?
Login.aspx

43) Default Session data is stored in ASP.Net.


InProcess

44) Which session modes stores session Information in Current Application


Domain?
InProc

45) If Integrated Security=false then User ID, and Password must be


specified in the connection string.
d. If Integrated Security=true then current Windows account credentials
are used for authentication.

46) In which file you should write the connection string, so you can
access it in all the web page for same application?
Web.config file

47) ______________is the first method that is fired during the page load.
Init()

48) Which protocol is used for requesting a web page in ASP.NET from the
Web Server?
HTTP

49) Which of the following control provides a link for unauthenticated


users to log on?
LoginStatus

50) Which of the following control provides a link for unauthenticated


users to log on?

You might also like