HCL Written and Technical Interview Questions asked at Hyd on jan 9th


In the written test they gave 6 question. From those 6 questions Writing a program and a Sql Query were mandatory.

Question



1) Versioning is applicable for private assemblies.
2) If Application Configuration and Server Configuration have different session state values, what will happen.
3) Write aprogram to convert string to integer with out using library.
4) Can we have override method methods as static that original was non static?
5) can we override private virtual methods?
6) Two tables and Asked to wirte a select query on thta( Employee details who earns salary mode that highest paid manager).

What is versioning

What is namespace of assembly at runtime, what are the methods in it

What is Virtual Base Class


Comments

Author: PHANI HARSHITHA MADALA03 Feb 2010 Member Level: Gold   Points : 1

Hi latha reddy,

Very usefull info..

Thanks for sharing with all of us.


regards,

harshitha

Author: Abhay Kumar Raut04 Feb 2010 Member Level: Gold   Points : 1

Hi latha reddy,

Very good piece of information about the interview questions.

Thanks,
Abhay

Author: mausumi05 Feb 2010 Member Level: Gold   Points : 0

hi,

Thanks for sharing these questions 2 all.
If any more pz send it.



4m
mausumi

Author: gopi15 Apr 2010 Member Level: Silver   Points : 1


Hi

Thanks to sharing of this type of usefull Information

This is is very usefull to attend an Interview candidates

and
If possible then post The Answers also.....


anyway THANKS once AGAIN....................HAVE A GUD DAY

Author: Vikram Singh Saini15 Apr 2010 Member Level: Gold   Points : 1

Hi,

Nice and tough real questions. These are the topics which we read but tend not to dive more about them. I just liked third question much; because it seems some which is either tricky or something else.

If possible please answer that ques

Thanks and Regards,
Vikram

Author: vidyasagar28 Jun 2011 Member Level: Gold   Points : 0

Hi latha reddy,

Good Collection.

Thanks,
Sagar

Author: Aswini Aluri20 Dec 2013 Member Level: Silver   Points : 1

1. version is applicable for Gac
where as private assemblies lie in individual folders

Author: Aswini Aluri20 Dec 2013 Member Level: Silver   Points : 2

4.No you can not declare the signature of the virtual method must remain the same ,only the keyword virtual is change to override.
5.No you can not override private virtual methods
we can access the protected virtual method

Author: Aswini Aluri20 Dec 2013 Member Level: Silver   Points : 2

If you have two tables
then join two tables and write a query
SELECT columnnames
FROM table1
INNER JOIN table2
ON table1.columnname=table2.columnname;
for highest salary query
select max(sal) from salary

Author: Aswini Aluri20 Dec 2013 Member Level: Silver   Points : 0

What is namespace of assembly at run time, what are the methods in it

system.reflection and system.Type.Invokemember to invoke method

Author: Aswini Aluri20 Dec 2013 Member Level: Silver   Points : 1

What is namespace of assembly at runtime, what are the methods in it
system.reflection and system.Type.Invokemember to invoke method

Author: Phagu Mahato21 Dec 2013 Member Level: Gold   Points : 10

[1] Versioning is applicable for private assemblies.

Yes, versioning is applicable to private assemblies too

There are 2 types of versions:
1)File version
2)Assembly version

File version is the default version that is assigned to any .NET assembly

example: click a .exe and view its properties: File version would always be there

Assembly version is applicable when we create a shared assembly(assembly installed in a GAC)

Private assemblies do not have Assembly version, but they do have File Version

Can private virtual methods be overridden in C#.NET?

No, moreover, you cannot access private methods in inherited classes,They have to be protected in the base class to allow any sort of access.

Can you override private virtual methods?

First of all private methods in the inherited class can't be accessed, so there is no question of overriding of private virtual methods.

You can't declare private virtual methods because private access specifier does not allow to inherit the private member of a class in a derived class.for example,

 using System;
public class XYZ
{
private virtual void mm() { }
}
public class abc:ABC
{
private override void mm()
{
Console.WriteLine("Hello");
}
}
class d:abc
{
public static void Main()
{
d D=new d();
D.mm();
}
}

What is a virtual base class?

An ambiguity can arise when several paths exist to a class from the same base class. This means that a child class could have duplicate sets of members inherited from a single base class.

C++ solves this issue by introducing a virtual base class. When a class is made virtual, necessary care is taken so that the duplication is avoided regardless of the number of paths that exist to the child class.
What is Virtual base class? Explain its uses.

When two or more objects are derived from a common base class, we can prevent multiple copies of the base class being present in an object derived from those objects by declaring the base class as virtual when it is being inherited. Such a base class is known as virtual base class. This can be achieved by preceding the base class’ name with the word virtual.

Consider following example:

class A
{
public:
int i;
};

class B : virtual public A
{
public:
int j;
};

class C: virtual public A
{
public:
int k;
};

}.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: