Subject Wise Interview Questions
Subject Wise Interview Questions
Infobeans:
Q. Have you used session in your project.
HolidayMe:
Q. 2 man standing back to back & walks 4 meters in opposite direction, then turn left and walks 3
meters. Find distance between them at last.
Q. Class program
{
int b=8, c=32;
P.s.v.M()
{
For(i=0;i<=10;i++)
{
If(c/b==2)
{C.W(“Hello”);}
else if(i!=4)
{ C.W(“CSharp”);}
else{break;}
}
}
}
Q. Eight(8) ball question. 7 ball having same weight but one is heavier, find out heavier one in minimum
step.
Q. Cylindrical glass of 100ml water. Just want to keep 50 ml water in it without using anything else or
measure.
Q. Men falled in 30 meter well. Everyday climbs 4 meter & slide down 3 meter. How many day required
to come out of the well.
Q. Pond having 1 flower. Everyday number of flowers get doubled. Means of 2nd day it will be 2, on 3rd
day , will 3. On 23rd day pond get full-filled with flowers, no extra space remained. Then how many days
half of pond filled with flower.
Q.
Int c=8,b=32,a;
Try()
{
A=b/c-5;
C.W(“Hello”);
}
Catch()
{
C.W(“Sharp”);
}
Finally
{
C.W(“Dot Net”);
}
Q. Class Student
{
Int id;
String name;
}
Class Program()
{
p.s.v.M()
{
List<student> students=new List<student>();
students.add(1,”ABC”);
students.add(2,”DEF”);
students.add(2,”GHJ”);
var a=students.where(x=>x.id==2).SingleOrDefault();
C.W(“Hello user”);
var b=students.Select(x=>x.id==2);
}
}
Q.
Capgemini:
Q. Write code how you done authentication & authorization in your MVC4 project?
Q. Have you done code analysis in your project?
Q.
AllState:
Q. Have you worked on deployment?
Q. What is application pool.
Q. When we recycle application pool & then what will happen?
Q. Explain agile scrum methodology?
Q. How work is assigned for you?
Q. What is Jira?
Q. Which source control you have used?
Q. When there is any bug found by tester, to resolve do you directly communicate with tester?
Q. If your work is depend on your colleagues work but somehow colleague is not able to finish his work
or anything else. How you handle this?
Q. Before contacting to manager/TL, can you try to understand why he/she is not able to work?
Q. What is FxCop?
Q. Have you know RPA?
Sagitech:
SQL Server
Infobeans:
Q. Can I create temp table in sp. If yes then what will be the scope for sp & temp table?
Q. Difference between char & varchar?
Q. I want to remove duplicate rows from MyTable , what will be the option?
Q. Do you know CTE? If in sql there are temp table & table variable then why should I use CTE?
Q. Without using outer left join. How we can achieve Left Join?
Q. Difference between temp table & table variable?
Q. In table there are 100 records. I want to achieve only 50 records using sp, how can I achieve this?
Q. In table there are two column i.e. id & name . In name there is duplicate records, how to find them?
Q.
IKS:
Q. select 8 from Emp
Q. select 8 from Emp where 1=2
FIS:
Cognizent:
Q. Difference between truncate & delete?
Capgemini:
Q. When trigger gets executed?
Q. How you handle error in sql?
Q. What is transaction?
Q. Write syntax for transaction where to commit where to rollback?
Q. What is cursor?
AllState:
Q. In sql, one task I have to do in daily basis. Is there any way to do it automatically.
Q. What is SQL Jobs?
Q. If any error occurred in that query. How you will know?
Q. What is trigger?
Q. Explain DML trigger?
Sagitech
Q. What is index?
Q. Why we cannot create 2 or more clustered index?
Q. If record is null and duplicate in my column then can I create clustered index on that column.
Q. on which column do I create clustered index?
Q. what if you need fast search & retrieval of information.
Q. What is temporary table & types?
Q. What is primary key & difference between unique & primary key?
Q. select count(2) from table?
Q.
T1 T2
A/C A/c Type Amount a/c type Percentage
1001 A 10000 A 6%
1002 B 5000 B 7%
TResult
a/c Interest Amount TotalAmount
101 =Amount*percentage*6month =Amount+interest
amount
102
- Using stored procedure calculate 6% & 7% interest on amount depend on a/c type in TResult table.
Q. How delete & truncate is different if both do the same thing?
Q. Write a query for male to female & female to male?
Q. Can you write sp?
Q. what will you do if your sp is working slow?
Q. What are indexes & its types?
Q. Why index & drawback of index?
Q. Can I apply one non-clustered index on multiple columns?
- Write o/p for left, right, full outer & Inner join.
Q. Can we set identity column value explicitly & how?
Q. If I want to set is one then how you do that?
Q. Ho you set default value for one of the table column?
Q. Can sp return value?
Q. Which status sp should be return?
Q. Can we write sp in function & why?
Q. Can sp written in select statement?
Q. How scalar function is called?
Q. What is union?
T1 T2
C1 C2 C1 C2
1 Ab 1 Ab
2 Bc 2 Bc
3 Cd 3 Cd
4 Ab 4 Ab
C#
Infobeans:
Q. Can we write private constructor & what is it?
Q. Let say I have private constructor in my class. I want to create object of class outside of the class .
How?
Q. Suppose I have abstract class & in that I have only abstract method then should I go with interface &
vice versa.
Q. What is reference integrity?
Q.
Q. What is constructor & what are different types of it?
Q. Suppose
Class A
{
//default constructor
// parameterized constructor
}
Class B:A
{
//default constructor
// parameterized constructor
}
Class C:B
{
//default constructor
// parameterized constructor
}
- B b=new B & C c=new C()
- How constructor will get called.
Q. Can we write return statement in void method & why?
Q.
FIS:
Q. Write program to reverse string without using function.
Q. Write program to reverse number without using function.
Q. Explain any pillars that you have used in your project?
Q. Generic is compile time or runtime?
Q. What is diamond problem.
Cognizent:
Q. How to achieve encapsulation?
Capgemini:
Q. What is difference between constant & readonly?
Q. If interface derived from abstract class, don’t want to implement method, then is it mandatory
provide declaration for interface method?
Q. What is datatable in c# & create datatable & insert value in it. Write code for it?
Q.
Q.
Q.
Sagitech
Q. Explain C# framework?
Q. Explain JIT compiler & it’s type?
Q. Suppose
Static class A
{
Static A(){}
Public A(){}
}
- is this possible?
- can we inherite static class from derived class.
- can we declare public static constructor in static class.
- can we create non-static constructor in static class.
Q.
Q. Exception handling & its scenario?
Q. When I use abstract class & why?
Q. I have declared abstract method but I don’t want the implementation?
Q. What is polymorphism?
Q. What is function?
Q. Can we write sp in function & why?
Q. What is stored procedure?
Q. What is delegate?
Q. If we can declare normal function then why use delegate?
Q. What is indexer?
Q.
Q. What is anonymous method & use of it?
Q. What is partial class & use of it?
Q. Suppose
Partial class A: interface1{}
Partial class B: interface2{}
- is this possible?
Q.
Q. What is extension method?
Q. Overloading scenario
Public int Add(){ }
Public double Add(int a, int b){ }
Public void Add(double a, double b){ }
& much more modifications in that one by one.
Q. Why we call overloading is compile time & overriding is runtime?
Q. Can we declare static class as abstract?
Q. If another data type exist for declaration then why I use var?
Q. What is dynamic & what is use of dynamic?
Q. Write extension method for String class?
Q. What is partial class & have you used?
Q. After compilation what will happen with partial class?
Q.
Q. What is oops?
Q. How oops is different from other language?(anup)
Q. What is class can you create nested class? Please write it down?
Q. Explain pillers?
Q. Give some real-time example for abstraction & encapsulation.
Q. Polymorphism & its type?
Q. Difference between encapsulation & abstraction?
Q. Difference between inheritance & polymorphism?
Q. What is static?
Q. What is static constructor & when it will call?
Q. If I declare static class and gives 4 method and called then which one 1st called
Q. What is extension method & how to call?
Q.
Q. What is singleton?
Q. If we don’t want to inherit class then what to do?
Q. How to stop to create object other than static?
Q. What is deadlock?
Q. How to prevent deadlock?
Q. What are reflection & which class used in reflection?
Q. Which method is used in reflection?
Q. What are base class of all types & method in base?
Q. What is var, dynamic & object & differ it?
Q. Suppose
Class A
{
Void Print(int a, int b){}
}
Class B:A
{
Void Print(int a, int b, int c){}
}
o/p: What will be output.
Q. How do you overcome from above scenario?
Q. Suppose
Class A
{
Void Print(int a){}
}
Class B:A
{
override void Print(int a){}
}
- What is o/p & how do you solve it?
Q.
Q. Suppose
Class A
{
Void AB
{
Int b;
return b;
}
A a1=new A();
a1.AB();
}
- What will be output?
Q. Suppose
Class A
{
Void new Print(){}
}
Class B
{
Void override Print(){}
}
- o/p of program
Q. What is method hiding? How you do it?
Q. If we does not specify new what will happen?
Class A
{
Void new Print(){}
}
Class B
{
Void Print(){}
}
- what will be output?
Q. Suppose we override the method then what will be the o/p of following code?
A=A
A=B
B=A
B=B
Q. Also what will be output for method hiding?
Q. What is var & if there are already other data type then what is the need of var?
Sagitech
Q. Difference between list & arraylist?
Q. int[] arr={50.20,100,60,300,87}
- Without using any inbuilt function print the 3rd highest number.
Q.
Q. If I declare collection<int> and List<int> which you prefer, and why?
Q.
List<person> p= new <person>();
List<employee> p= new <employee>();
- print the person list.
Q. I have list<employee> emp=new list<employee>(){ id=1001, Name=”Vishal J”, Organization=”xyz”};
- I want to print only organization value.
Q. Can we add value without providing key in dictionary & hastable?
Q. What is anonymous method & where we can use anonymous method?
Q. What is generic & non-generic?
Q. Instead of KeyValuePair, is there any option we can use to retrieve?
Q. If I will try to retrieve value from dictionary using key which is not exist in dictionary what will
happen? (exception)
Q. If we do same with HashTable? (Null value)
Q.
Q. What is collection & write syntax for dictionary?
Q. What are collection & its type?
Q. What is generic?
Q. How generic differ from collection?
Q. Why collection is not type safe?
Q. Write syntax for has table?
Q. Write syntax for dictionary?
Q. Difference between hastable & dictionary?
Q. Why dictionary is type safe?
Q. Which is better for performance & why?
Q.
ASP
Infobeans:
Q. Have you used master page?
Q. If I have webform & master page in my project. In initialization & loading stage of life cycle which will
call first.
Q. What is cache, If I want to cache part of page the how you achieve?
Q. What we write in web.config file?
Q. What is auto event wireup?
Q.
Infobeans:
Q. Which session mode you have used?
Q. Explain different session modes?
Q.
Cognizent:
Q. When we set cookiless session then where session data will get stored?
Q. What is cache?
Q.
Capgemini:
Q. How to pass data from one page to other?
Q.
Sagitech
Q. State management technique?
Q. I want to store my session in serer service. Which SessionState mode I have to use?
Q. Difference between InProc & StateServer?
Q. Disadvantage of inProc & stateServer?
Q. If user has disabled the cookies then which alternative option will you use?
Q. What is QueryStirng?
Q. Explain application life cycle?
Q. Explain MHPM?
Q. Which all events are get fired in application life cycle?
Q. If I have to inject some logic after the page is ready to load, in which event I have to do?
Q. Explain page life cycle?
Q. What is difference between viewstate & querystirng?
Q. Session management technique?
Q. How session work?
Q.
ADO
Capgemini:
Q. Write a connection string to connect database & how execute sp through ado.net?
Q. What is difference between dataset & datatable?
Q. Write code in ado to call sp. Consider sp has two i/p & one o/p parameter?
MVC
Infobeans:
Q. I have to insert record into database through mvc, how I can achieve this explain entire flow, what
you write in view, model & controller.
Q. How to validate entered email is valid or not?
Q. What is difference between code first & database first?
Q. What is difference between making startup page in asp & routing?
Q. What is difference between session & application?
Q. User click on logout button mean session expired. If he copy url & put it on new tab. Which page
should display?
Q. What is forms authentication?
Q. What is https?
Q. I want to return void from ActionMethod, then how can we achieve?
Q. What is ajax & why it say asynchronous call?
Q.
Q. Why I should use textBoxFor over textbox?
Q. What are strongly type view & its benefits?
Q. What is RouteConfig?
Q. If we have asp then why should I use mvc?
Q. Tell me about entity framework?
Q. Which approach you have used in your project?
Q. What is difference between viewbag & viewdata?
Q. What is TempData?
Q. Is TempData preserve data for only next method or can I use TempData in all the methods?
Q. How to do client side validation in mvc?
Q. What are different validation attributes in MVC & explain each?
Q. What is action filter?
Q. The execution of ActionFilter which will will execute first & last?
Q. Can I create custom ActionFilter & if yes then how?
Q. If I want to return string which ActionResult should I use?
Q. What is ajax & write syntax?
IKS:
Q. How to achieve
Basic Info Personal Profession
Field Field Field
1 2 3
4 5 6
7 8 9
Q. If I have one view in that view there is one button & one div tag. I want to create one partial view that
render when we click on that button with ajax call?
Q. How view model works? If I have three classes & a single view model then tell me the flow?
Q. How partial view is render?
Q. Suppose I have one view, in that we create two button(Add & Clear). Then how you identity which
button I have clicked. Tell me the flow?
Q. I have 20 views that needs to be parsed using Json object & the service is called using ajax. How you
can do that?
FIS:
Q.
Q. In which names /class attributes are present?
Q. If I have one custom attribute can I apply it directly or I need to do anything else?
Q. Can we use two models in one view? Like: (1)model Employee & (2)model Department.
Q. What is partial view?
Q. I need some data to perform operation on parital view. How to pass data from one to partial view?
Q. How to render partial view in view?
Q. I have two button on view I want to call different method on each button click. How can we achieve
it?
Q. How many types of ActionResults?
Q. What are ActionFilters?
Q. What is role of model, view & controller?
Q. Explain mvc cycle from routing to result which is show to end user?
Q. How I can move http request to Https?
Q.
Cognizent:
Q. What is ajax & where you use?
Q. Benefits of mvc?
Capgemini:
Q. In which mvc version you have worked on?
Q. How to bind data to dropdownlist using jquery/ajax?
Q.
Q. What is ActionFilter?
Q. What is authorize attribute?
Q. Explain exception filters?
Q. Explain mvc architecture?
Q. How to pass data from controller to view, view to controller and controller to controller?
Q. How you validate user name is already exist or not?
Q. Write syntax for ajax method?
Q. Which grid you have used to display record in mvc?
Q. What are types of result in mvc?
Q. What are attributes?
Q. Have you experience on web api?
Q. What are security threats in application?
Q. Explain cross site scripting attack & how you handle it?
Q. What is antiforgery token
Q. How you maintained session in mvc project?
Q. What is difference between tempdata & session variables?
Q. Do you know any other aggregate syntax to call ajax?
Q.
Q. Write down syntax for ajax call?
Sagitech
Q. How you do client side validation?
Q. What is difference between web form & MVC?
Q. Explain solid principle (each one with example)
Q. What is singleton pattern?
Q. Do you know any other patter?
Q. Explain architecture of MVC?
Q. Explain ViewBag, ViewData, TempDatam & ActionLink.
Q. Explain all attribute in mvc?
WCF
AllState:
Q. What is WCF?
Q. What is WSDL?
Q. How to create proxy class instance?
Q. Is there any other way to create instance of proxy class?
Q. What are contracts?
Q. How do you handle exception?
Q. To include/add inner exception in Soap_Fault , What need to do?
Q. How client communicate with service?
Q. What is end point?
Q. If service on different server & client is on different server. Is it possible to consume service.
Q. In which format communication happening between client & service?
Q. If operation/method from service returning NULL value instead of required o/p, how do you find out
the issue?
Q. How you test wcf service?
Sagitech
Q. Explain request & response in web api?
Q. How to create WCF service & how to consume it?
Q.
JavaScript
Infobeans:
Q. I have function js, once the page is loaded this function should be executed, how can achieve this?
Q. How to fetch entire html which is in div tag.
Q. Difference between JS & Jquery & which is faster?
IKS:
Q. What is selector?
Q. Retrieve value & get sum of element using JQuery.
1 2 3
4 5 6
7 8 9
Q. I have button which is not shown to user side. When user click on div then fire button event.
FIS:
Q. Can we call C# function through JavaScript?
Q. So there will be a request response right?
Cognizent:
Q. Explain similarity between Ajax & Jquery?
Q. What is selectors?
Sagitech
Q. If javascript disabled then how to implement remote attribute in AJAX?
Q. Write javascript without heating database & sort the record which have 1000 of records. Without
using jquery?
Q. What is javascript & use of javascript?
Q. Difference between javascript & jquery?
Q. How many ways you define the dictionary?
Q. What is ajax?
Q. what is $ in jquery?
Q. Can we replace it & how?
Q. If there is javascript then why jquery?
Q. In one application , if there are two javascript file different version then what will happen?
Q. Which is faster between js or jquery?
Q. In jquery which selector is faster?
Q. Write a script to make a row in table with different color?(odd & even)
Q. What is angular js?
Q. Tell me Jquery version?