Wednesday, June 13, 2007

Vocabulary - III

1.Method or system of government
regime

2.power to produce desired effect
efficacy

3. Temporary platform for workers; bracing framework; platform for execution
scaffold

4. Boasting
braggadocio

5. Operatic solo
aria

6.Advocate of voting rights (for women)
suffragist

7.Omission of words from a text
ellipsis

8.Tender to sorrow; pity; quality in art or literature that produces these feelings.
Pathos

9.Home
domicile

10.Approval
approbation

11.Import
Bring in

12.Debutante
A young woman who is being introduced formally into society by appearing at a public event such as a dance or party

13.Intellect
Mental Power

14.Poultice
a warm moist preparation placed on an aching or inflamed part of the body to ease pain, improve circulation, or hasten the expression of pus.

15.Swindler
Cheat, fraud

16.Incursion
raid, attack

17.Isotope
Either of two or more forms of a chemical element with the same atomic number but different numbers of neutrons.

18.Primogeniture
he state of being the first-born child of a set of parents

19.Formality
Procedure

20.Peroration
Speech

21.Colander
strainer

22.Squabble
Argue

23.Yeoman
A loyal, reliable, or diligent worker

24.Plenitude
Abundance

25.Quiver
tremble

26.Vivisection
The practice of operating on living animals in order to gain knowledge of pathological or physiological processes

27.Affirmation
Confirmation

28.Vendetta
Feud

29.Predilection
Liking, fondness

30.Precursor
Ancestor

31.Cringe
Recoil, Shy away

32.Affix
attach

33.Relegate
Demote, Downgrade

34.Quibble
hedge, split hairs

35.Perturb
Trouble, bother

36.Allege
Claim

37.Gibe
Tease, Mock

38.Decimate
destroy

39.Canvass
campaign

40.Quell
Supress

41.Evoke
bring to mind

42.Shunt
Push

43.Allude
to mention something or somebody, usually briefly, without giving a precise name or explicit identification but usually making clear by other means who or what is being referred to.

44.Tantalize
tease

45.Quail
Draw back

46.Annotate
Gloss

47.Surmount
conquer

48. Incense
anger, enrage

49.Descry
to catch sight of something

50.Brusque
abrupt

51.Discount
Concession

52.Extol
admire

53.Underscore
highlight

54.Liquidate
Pay a debt

55.Bait
attraction

56.Mire
marsh, mud

57.Disembark
land

58.Mollify
Pacify

59.Begrudge
envy

60.Proselytize
to try to convert somebody to a religious faith or political doctrine

61.Pine
hang around

62.dishearten
dicourage

63. Echelons
a level of authority or rank in an organization or system

Vocabulary - II

1. facing; across from; contrary; reverse; different; antithetical
(a)meaning
(b)payable
(c)opposite
(d)legitimate


Ans: opposite


2. to rotate; to turn; to spin; to encircle; to think about; to contemplate
(a)counterbalance
(b)revolve
(c)base
(d)reflect


Ans: Revolve


3. act of dragging or pulling with a rope or chain
(a)deposit
(b)tow
(c)adjustment
(d)area

Ans: tow


4.standard against which something is measured; factor; discipline
(a)surface
(b)applicant
(c)gratuity
(d)criterion


Ans: Criterion


5.wages; living; stronghold
(a)retailer
(b)pose
(c)keep
(d)coincidence


Ans: Keep


6. gross error; stupid mistake
(a)response
(b)food
(c)commodity
(d)blunder

Ans: Blunder


7.state of losing property to one's creditor's due to unpaid debts; insolvency
(a)gap
(b)present
(c)bankruptcy
(d)inspiration


Ans: Bankruptcy


8.an interest percentage that changes over time
(a)disclaimer
(b)adjustable rate
(c)license
(d)editor


Ans: Adjustable Rate


9.demand for goods or services; rate of purchase and sale; fair
(a)market
(b)exit
(c)illustration
(d)resist


Ans:Market


10.period; era; generation
(a)calculator
(b)age
(c)advance
(d)mail


Ans: Age


11.knowledge obtained by doing; something that one has lived through
(a)treatment
(b)target
(c)aging schedule
(d)experience


Ans: Experience

12.piece of equipment which can be used with other machines without alternation
(a)addiction
(b)imagining
(c)cruise
(d)compatible


Ans:Compatible


13.to present; to show or illustrate something through example, or physical demonstrations
(a)adjourn
(b)ignore
(c)hesitate
(d)demonstrate


Ans: Demonstrate


14.to bend; to turn sharply in a different direction
(a)angle
(b)release
(c)foster
(d)carry


Ans: Angle


15.to cause suffering to; to behave unjustly toward
(a)mark
(b)argue
(c)wrong
(d)conceal

Ans:Wrong

16.to gather; to garner; to assemble; to accumulate; to take payments
(a)legitimate
(b)collect
(c)button
(d)number

Ans: Collect

17.to establish; to erect; to throw; to toss
(a)fizzle
(b)pitch
(c)attract
(d)tax

Ans: Fizzle

18.to substantiate with evidence; to demonstrate; to show clearly
(a)Depart
(b)Export
(c)Prove
(d)Even

Ans:Even

19.painstaking labor; careful planning; adding of extra details; act of improving; production
(a)terminology
(b)resolve
(c)elaboration
(d)crate

Ans: Elaboration

20.to feign; to impersonate; to put on a false show
(a)explain
(b)attach
(c)rebound
(d)pretense

Ans: Pretense

21. Think Over;ponder; to contemplate; to heat and spice for drinking
(a)taste
(b)mull
(c)own
(d)railroad

Ans: Mull


22.to experience; to endure
(a)receive
(b)go through
(c)scratch
(d)argue

Ans: go Through

23. spreading over a large area; comprehensive
(a)extensive
(b)self-employed
(c)rank
(d)clear

Ans: Extensive

24. Present for the first time; to initiate; to establish; to announce
(a)impede
(b)introduce
(c)reply
(d)pull out

Ans:Introduce

25. to spring back
(a)franchise
(b)rebound
(c)suppose
(d)leverage

Ans: Rebound

26. As soon as
(a)immediately
(b)either
(c)unless
d)though

Ans: Immediately

27.line at which a surface ends; thin sharp side of a blade; excitement
(a)improvement
(b)edge
(c)habit
(d)slip

Ans:Edge

28.Limitation;limit
(a)restriction
(b)client
(c)application
(d)myriad

Ans: Restriction

29.plans or methods created for the purpose of achieving a goal
(a)margin
(b)strategy
(c)clearance
(d)special

Ans: Strategy

30. any vehicle which can be flown (i.e. helicopter)
(a)interviewee
(b)bearer
(c)matter
(d)aircraft

Ans:Aircraft

31.inclusion; participation; connection; association; relation
(a)gratitude
(b)term
(c)furniture
(d)involvement

Ans: Involvement

32.working; functional; ready for use
(a)germane
(b)spot
(c)operational
(d)departmental

Ans:Operational

33.connection; attachment
(a)affiliation
(b)associate
(c)trial
(d)temper

Ans:Associate

34.Injecture; supposition; hypothesis
(a)incinerator
(b)guess
(c)technology
(d)diary

Ans:Guess

35.substance burned to create energy (petrol, gasoline, gas, wood, coal, etc.)
(a)appearance
(b)apology
(c)regard
(d)fuel

Ans: Fuel

36.section; piece; region; role; function; side in an agreement
(a)vocabulary
(b)plan
(c)part
(d)estate

Ans:part

37.to irritate; to infuriate; to enrage
(a)disembark
(b)anger
(c)scrutinize
(d)route

Ans:Anger

38.to accomplish; to put into action; to execute; to do
(a)dispute
(b)exchange
(c)effect
(d)trust

Ans:Effect

39.to present in a condensed form; to list the main points in a brief and comprehensive manner
(a)summarize
(b)stall
(c)pocket
(d)loop

Ans:Summarize

40.to provide additional details; to plan carefully and with great detail; to produce; to develop
(a)sign
(b)elaborate
(c)launch
(d)grade

Ans:Elaborate

41.to surround; to confine; to close in; to place an additional document or letter within another
(a)floor
(b)intensify
(c)enclose
(d)neglect

Ans:Enclose

42. to make or to fit according to individual needs or desires; to personalize; to individualize
(a)pair
(b)customize
(c)feed
(d)calculate

Ans:Customize

43.to give out; to distribute; to ration; to set aside for a special purpose
(a)position
(b)allot
(c)
draw
(d)
illustrate

Ans:Allot

44.behavior; management
(a)capital
(b)penalty
(c)frequency
(d)conduct

Ans:Conduct

45.to send; to direct; to ascribe to; to relate to; to apply to; to call attention to
(a)arrive
(b)refer
(c)wait
(d)mistake

Ans:Refer

46.to come near to; to tackle (a problem or situation)
(a)approach
(b)grasp
(c)conjure
(d)enter

Ans: Approach


47.to accomplish; to put into action; to execute; to do
(a)dispute
(b)exchange
(c)effect
(d)trust

Ans:Effect

48.to present in a condensed form; to list the main points in a brief and comprehensive manner
(a)summarize
(b)stall
(c)pocket
(d)loop

Ans:Summarize

49.to provide additional details; to plan carefully and with great detail; to produce; to develop
(a)sign
(b)elaborate
(c)launch
(d)grade

Ans:Elaborate

50.to surround; to confine; to close in; to place an additional document or letter within another
(a)floor
(b)intensify
(c)enclose
(d)neglect

Ans:Enclose

51.to cause; to bring about; to set in motion; to influence
(a)embrace
(b)specialize
(c)induce
(d)contract

Ans:induce

52.to give a mark to; to classify; to make level; to evaluate; to assess
(a)grade
(b)fleet
(c)volunteer
(d)fail

Ans:Grade

53.celebration; feast; dinner; drinking
(a)vendor
(b)banquet
(c)auditorium
(d)attendant

Ans:Banquet

54.amount of money received in payment for goods or services or from other sources; revenue; profits
(a)income
(b)rent
(c)method
(d)implementation

Ans: Income

55.obligated; engaged; industrious; ambitious; loyal
(a)annoying
(b)committed
(c)harmful
(d)occupied

Ans:Committed

56.unable to wait; intolerant; restless
(a)conventional
(b)earnest
(c)acquainted
(d)impatient

Ans:impatient

57.to move quickly; to pass quickly
(a)fleet
(b)weigh
(c)target
(d)emulate

Ans:Fleet

58.examination of financial accounts; internal investigation
(a)fare
(b)photographer
(c)audit
(d)anchor

Ans:Audit

59.to list; to describe; to specify; to assign
(a)detail
(b)emulate
(c)merchandise
(d)reinforce

Ans:Detail

60.to buy; to acquire in exchange for money; to procure; to obtain
(a)fluctuate
(b)diet
(c)purchase
(d)deny

Ans:Purchase

Note: Please refer http://www.english-test.net/toeic/vocabulary/words/221/index.html for more questions

Tuesday, June 12, 2007

Vocabulary - I

1. ------------------------ to go along with; to go together with; to join; to attach
(a)affect
(b)forward
(c)accompany
(d)narrow


Ans: accompany

2. -------------------------. guarantee; authority; justification
(a)square
(b)scramble
(c)warranty
(d)recruitment




Ans:warranty

3. one who activates; worker of a telephone switchboard; operation symbol
(a) operator
(b) exposure
(c) divide
(d) output

Ans: Operator

4. fleece from some animals; frizzy hair
(a) Litter
(b) Wool
(c) gate
(d) offset

Ans: Wool

5. attentive; conscious of
(a) representative
(b) aware
(c) large
(d) unsatisfactory

Ans: Aware

6. one who damages a person or his property or rights
(a) facility
(b) denial
(c) coincidence
(d) trespasser

Ans:trespasser

7. reliable; trustworthy; dependable
(a) commercial
(b) aggregate
(c) robust
(d) credible

Ans: Credible


8. to substitute for; to return something to a particular position or location
(a) scan
(b) replace
(c) pad
(d) leave

Ans: replace

9. enduring; lasting; continuing; leftover; remaining
(a) persistent
(b) intensive
(c) severe
(d) residual

Ans:residual

10. bed covering; quilt
(a) size
(b) special
(c) Blanket
(d) downtown

Ans: Blanket

11. to substitute for; to return something to a particular position or location
(a) scan
(b) replace
(c) pad
(d) leave

Ans: replace

12. relating to supervision and responsibility
(a) digital
(b) rival
(c) lucrative
(d) managerial

Ans: managerial

13. of public funds; of or pertaining to money matters
(a) potential
(b) fiscal
(c) supportive
(d) remote

Ans: Fiscal

14. invaluable; beyond any expressible value; very expensive
(a) bothersome
(b) genuine
(c) priceless
(d) confidential

Ans:priceless

15. skilled; able; proficient; adept
(a) tender
(b)resident
(c) capable
(d) contemporary

Ans: capable

16. coherent; steadfast; firm
(a) additional
(b) circumspect
(c) substantive
(d) consistent

Ans:consistent

17. well; not sick; fit; sound
(a) healthy
(b) comprehensive
(c) elementary
(d)imaginary

Ans:healthy

18. inferior; of secondary importance; under the authority of another
(a) precise
(b) collectible
(c) adamant
(d) subordinate

Ans:subordinate

19. to advance; to move forward; to gain
(a) dispense
(b) prevent
(c) shop
(d) progress

Ans: progress

20. of or pertaining to the upper class
(a) buoyant
(b) various
(c) certain
(d) society

Ans: society

21. inexpensive; cheap; of or relating to a financial plan
(a) budget
(b) discrete
(c) peculiar
(d) brokered

Ans: Budget

22. n. general expenses; manufacturing and business expenses
(a) cash
(b) border
(c) overhead
(d) layman

Ans: Overhead

23. person or business that sells goods to final consumers
(a) retailer
(b) persistence
(c) clip
(d) rise

Ans:retailer

24. opposition; appeal; denial; protest
(a) proliferation
(b) source
(c) objection
(d) satisfaction

Ans:objection

25. wages; rent; rental; charge; fee
(a) progress
(b) hire
(c) inflation
(d) creditor

Ans:Inflation

26. one who is subservient; someone under the authority of another
(a) compatible
(b) subordinate
(c) vegetarian
(d) measurement

Ans:subordinate

27. small machine that makes computations
(a)delegate
(b) few
(c) calculator
(d)inspector

Ans Calculator

28. garbage; trash; waste
(a) resume
(b) traffic
(c) refuse
(d) daily

Ans: Traffic

29. work beyond regular working hours; pay for such work
(a) segment
(b) crop
(c) overtime
(d) expert

Ans:overtime

30. detailed account of an occurrence or situation
(a) impulse
(b) operation
(c) report
(d) stay

Ans:report

31. mark; symbol; indication; hint; trace; notice; advertisement
(a) part
(b) candidate
(c) sign
(d) messenger

Ans:Sign

32. to bear witness; to declare under oath; to attest
(a) testify
(b) salvage
(c) file
(d) list

Ans:Testify

33. to set apart an additional amount of space or money for security
(a) locate
(b) foster
(c) margin
(d) award

Ans:foster

34. to bill; to charge
(a) rebound
(b) aggregate
(c) manage
(d) invoice

Ans: Invoice

35. to cause to be acquainted; to accustom; to make something well known; to publicize
(a) store
(b) cushion
(c) familiarize
(d) lack

Ans: Familarize

36. to rub off; to remove totally; to delete
(a) know
(b) pose
(c) groom
(d) erase

Ans: Erase

37. tag; sign; identification tag
(a) bonus
(b) badge
(c) feature
(d) requirement

Ans: Badge

38. to adapt oneself; to host guests; to provide lodging
(a) accommodate
(b) prize
(c) pose
(d) slip

Ans: accomodate

39. to fall; to make fall; to bring down; to go down; to omit; to abandon
(a) tenant
(b) drop
(c) publicize
(d) suspend

Ans: drop

40. to nominate; to designate
(a)prevail
(b) climb
(c) appoint
(d) compare

Ans:appoint

41. to shut; to be shut; to finish; to complete
(a) give up
(b) post
(c) machine
(d) close

Ans: Close

42. knowingly; with awareness
(a) surely
(b) good
(c) consciously
(d) initially

Ans: Consiously

43. also; too; as well
44.
(a) nearby
(b) either
(c) pretty
(d) least

Ans:either

45. in another country; outside; widely
(a) frequently
(b) abroad
(c) etc.
(d) behind

Ans:abroad

46. side by side; in alignment; on top of; up-to-date; well-informed
(a) gradually
(b) abreast
(c) ostensibly
(d) smoothly

Ans: abreast

47. commonly; generally; regularly
(a) between
(b) usually
(c) especially
(d) necessarily

Ans: usually

48. appraisal; estimation; assessment
(a) affiliate
(b) accordance
(c) effort
(d) evaluation

Ans: evaluation

49. without consideration for possible problems; anyway; in any case
(a) below
(b) foremost
(c) regardless
(d) randomly

Ans:Regardless

50. at an angle; obliquely; in a slanting direction
(a) slantwise
(b) originally
(c) apparently
(d) solely

Ans: Slantwise

51. from above; above; in the sky
(a) especially
(b) overhead
(c) downward
(d) fine

Ans: Overhead

52. in place of; as a replacement
(a) instead
(b) originally
(c) downtown
(d) severely

Ans: instead

53. foreign; abroad
(a) somber
(b) tense
(c) overseas
(d) thorough

Ans: overseas

54. aspiring; desirous of success; requiring great effort
(a) conversant
(b) ambitious
(c) comfortable
(d) distinctive

Ans: ambitious

55. to enter; to penetrate; to infiltrate; to suffuse
(a) permeate
(b) bottom
(c) reflect
(d) resemble

Ans: Permeate

56. resistant; invulnerable; impervious; sealed; durable
(a) payable
(b) commercial
(c) duplicate
(d) proof

Ans: Proof

57. lively; vigorous; crucial; critical; necessary
(a) persistent
(b) eligible
(c) vital
(d) select

Ans: Vital

58. to become bigger; to expand
(a) enlarge
(b) guarantee
(c) expel
(d) mull

Ans: Enlarge

59. to stretch; to enlarge; to lengthen; to reach out
(a) progress
(b) extend
(c)order
(d) inhabit

Ans: Extend

60. person who translates from one language to another (orally); person how clarifies; commentator
(a) interpreter
(b) baggage
(c) pick up
(d) dispense

Ans: Interpreter

61. foundation; organization which provides a certain service or supports a particular cause
(a) offer
(b) perspective
(c) letter
(d) institute

Ans: Institute

62. to arrive; to obtain; to procure; to extend the arm outward
(a) misunderstand
(b) remove
(c) reach
(d) fetch

Ans: Reach


Reference : http://www.english-test.net/toeic/vocabulary/


Monday, June 11, 2007

Sending Email Using - ASP.NET C#

To send a mail in ASP.NET 2.0 we need to import the namespace System.Mail.Net.
This namespace contains classes to send electronic mail to a Simple Mail Transfer Protocol(SMTP) server for delivery.There are many classes in this namespace, but the two main classes used to send a mails are SmtpClient and MailMessage.
The SMTPClient Class transmits email to the SMTP host that you designate for mail delivery.
MailMessage Class is used to create a mail Mesasage.
We will discuss other classes in detail in afterwards,

SMTPClient and MailMessage Classes

Let us take a look on a simple application used to send a mail,
You can use the same logic to send mails from command line application, windows application or a web application.
In the program given below I am writing a windows application to send mail.

This is just the cs file of the application :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail; // This name needs to be imported
namespace Email
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{

}
private void button1_Click(object sender, EventArgs e)
{
try
{
MailMessage mail = new MailMessage(txtFrom.Text, txto.Text, txtSubject.Text, txtBody.Text);
SmtpClient emailClient = new SmtpClient(txtSMTP.Text);
emailClient.Send(mail);
label6.Text = "Message Sent Successfully";
}
catch (Exception exp)
{
label6.Visible = true;
label6.Text = exp.ToString();
}
}
}
}


Note : I am thankful to msdn and www.aspnettutorials.com

Thursday, May 31, 2007

Simple Question in OOPs and C++

These are some of the simple question in OOPs and C++ .
These are from my notes while preparing for exams and getting my job training.
I just wanted to keep it safe here and will be happy if these questions will be of any help to you.
I will update the blog if I get any more questions.

1. What is a class?
Ans: A class is a represents the method of binding data and the related functions together.
Class is a blueprint from which objects are created and manipulated.

2. What are the objectives of class declaration?
Ans: A class declaration is done to specify the properties and data required to model the entity in an application.

3. What are different data assessors used in C++?
Ans: Private, public, protected.

4. What is the default level access specified in a c++ program?
Ans: Private.

4. What is data hiding?
Ans: Defining the accessor properties for a method, variable using the keywords private/public is called data hiding.

5. What are member functions?
Ans: Members that are class specific are called member functions.

6. How to declare a member function?
Ans: Member functions are declared as a prototype in a class. The exact function is declared outside the class.

7. What is the syntax of a member function in C++?
Ans: Return type Class :: FunctionName(arguments)
{
Function body
};

8. What is “::” called and what does it signify?
Ans: “::” is called a “scope resolution operator” it signifies the belonging of a particular function or member to a particular class.

9. What are the ways in which arguments can be passed to a function in C++ , how does it differ from passing parameters in C# ?
Ans: In c++ parameters can be passed in three forms: Value, reference and pointer.
In C# parameters can be passed either as value or as a reference.

10. How is member function passed to a class as ------?
Ans: As a pointer.

11. What is a constructor?
Ans: Constructor is a member function that creates an instance of the class. A Constructor has the same name as the class for which the object is being created for.

12. What is memory pool?
Ans: Memory pool is the memory space provided to a program to use at run time.

13. What do you mean by Dynamic memory allocation?
Ans: Memory space is provided to a program during run time this is called dynamic memory allocation.

14. How the operator “new” works?
Ans: Operator “new “first allocates the required memory to object from the memory pool, and then calls the constructor of the class. The constructor the address of the memory allocated to the object.

15. What is a destructor?
Ans: Destructor is a member function called by the class to deinitialize the objects that are initialized by the constructor.

16. When shall a destructor be called and how should it be called?
Ans: A destructor is called whenever the object of the class goes out of scope. The syntax of destructor is class name preceded by a “~” sign.
Ex: Destructor for class1 is ~class1 ();

17. How do you de-allocate the memory space given to a member of a class?
Ans: Using the function Delete ().

18. What is the difference between Delete and De-initialize functions?
Ans: De-initialize function, de-initializes or destroys objects in a function. Whereas delete function releases the memory of the object initialized in a class.

19. What do you mean by composition and composite objects?
Ans: Composition refers to the “component relationship” between two objects ,where one object is dependent on the other.For instance, let us take the example of a class named “Student” in this class the “Student Name” and “Course taken “are dependent on each other. Such objects are called composite objects. Composition is initialized for mutally dependent objects.

20. What is the relationship between constructor, destructor and composition?
Ans: The sequencing of constructor and destructor is dependent on composition. If we take the previous example then the destructor for “Course taken” cannot be called before destructor for “Student Name”.

21. Give the syntax to declare a composition.
Ans: Following is the example to show the composition for the example given above.
Class Student
{
Private:
String Student Name;
Int CourseNumber;
String Address;
Public:
Student (const String&, const Int&);
};
Student::Student (Const String& n, const Int& c): name (n), course(c)
{
}
Here whenever name object is created, course object is created and initialized automatically.
Whenever the composite object Student is destroyed the objects are de-initialized and destroyed in the reverse order of their initialization and creation.

So, in our example first the Student object is destroyed and initialized, then the course taken object and finally the name object.

22. What is association?

23. What is the syntax used to define an association?

24. Describe how would you create an association using address pointer?

25. What is Inheritance?
Ans: When we want to declare a class Class 2 which has features similar to a class Class1 defined earlier , then instead of declaring Class 2 again , we can derive it from Class1 .This is called inheritance.
To give a complete definition:
Inheritance is the process by which one object/class acquires the properties of another object/class.

26. What are the advantages of inheritance?
Ans: Code reusability and maintainability, reduces development time.

27. Are the private members of the base class available to child class?
Ans: No. Only Public and protected variables are accessible.

28. What is the syntax to inherit a subclass from a base class?
Ans: Subclass: public baseclass
{
}
29. If Class C inherits Class B and ClassB inherits Class A.Then what informations are present in Class C?
Ans: Informations from Both class A and Class B.This is called multilevel inheritance.

30. What is member initialization list?
Ans: Member initialization list is the information containing an entry call to derived class’s immediate base class.

31. If you say that member initialization list contains only the call to immediate base class of a derived class, how can you justify your answer for Q29?
Ans: The member initialization list contains only the call to immediate base class of the derived class but the immediate parent’s constructor invokes the immediate base class until the uppermost class is reached.

32. What is dynamic binding/late binding are the same or different?
Ans: Dynamic binding is same as late binding. This is the process of invoking appropriate behavior of an operation based upon the arguments.

33. Can you explain this concept?
Ans: Lets as take the example of “+” operator, the “+” operator can be used for addition of two integers or concatenation of two strings. The behavior of this operator in the program is known only during the run time not during compile time. If the variables are int “+” does addition. Otherwise “+” is used for concatenation. This is what is called late binding or dynamic binding.

34. What do you call this other than late binding /dynamic binding?
Ans: This process is also known as polymorphism. That is one operator taking multiple roles.

35. What is the most important property of polymorphism?
Ans: Polymorphism allows objects that have different internal structure to take the same function name.

36. What do you mean by overriding?
Ans: Overriding means changing the implementation of a function in a derived class.

37. How is polymorphism supported in C++?
Ans: By declaring the function virtual in base class and derived class.

38. What do you mean by Virtual function?
Virtual function is a function in derived class with features specific to the derived class.

39. So how a virtual function does differs from a general derived function?
Ans: A virtual function in a derived class has same function name, same parameters, same return type as that of the base class but the method implementation is different.

40. What are the two features available in c++ for error checking in development?
Ans: Const function and assert () macro.

41. What does the following declaration signify? int String(const *P)
Ans: It signifies that the value of the variable declared at address P should not be modified.
In case of modification the compiler throws an error.

42. How can u use assert () macro?
By including assert
The declaration is given as #include
The syntax to use assert macro is:
#include

Void class ClassName::FunctionName(arguments)
{
Assert (condition);
};
Here function name represents the function that represents error.
Assert macro checks for errors based on the condition.

43. Where is the assert macro generally placed in a function?
Ans: Assert macro is place at head as well as at the end of the function. It is placed at the head to evaluate the incoming parameter/arguments, and at the end to validate the object is in its proper state before the function terminates.

44. What is a fiend class in C++? What is its Syntax?
Ans: A class can access the private variables of other class by declaring the class as a friend class.
The syntax of friend class is friend class
Friend function

45. A friend class allows unrestricted access to the members of a class. True/False?
True.

46. What are the advantages and disadvantages of declaring a class as a fiend class?
Ans: Advantage: A declaring a class as a friend class allows the subclasses to access the private variables and functions.
Disadvantage: Declaring a class as a friend class allows other classes to modify the base class implementations of the functions. Which can cause complications in a program.

47. What do you mean by default initialization in C++?
When an object is passed as a value to a function, the compiler creates a local copy of the variable in the stack this is called default initialization.
Default initialization also happens when an object is returned back from a function by value.

48. What are the disadvantages of default initialization?
1. In default initialization, the initialized object of deleted buffer will not get the correct value.
2. The newly created object of the same type also points to the same dynamically allocated buffer.

49. What is shallow copy?


50. What do you mean by pure virtual function?
Ans: Declaring a function as pure virtual function ensures that the base class virtual function does not override the derived class function. That is whenever the function is called it is not the base class function but the derived class function.

51. Can a pure virtual function be called from a base class? Why?
Ans: No. Because the pointer to pure virtual function in pure virtual table is null. When the base class constructor calls a pure virtual function it gives a run time error.

52. What is the declaration for a pure virtual class function?
Ans: class BaseClass
{
Public:
Virtual void functionName() = 0;
};

53.What are the impoprtant concepts in OOP?
Ans: Abstraction,Inheritance, Polymorphism


mail me at: archita.dash@rediffmail.com

Wednesday, May 30, 2007

General .NET Interview Questions

These are some of the list of questions I have collected from various sites, while making my fundamentals and Concepts on C# and .NET strong.These question follow no particular order,these are listed as andwhen they were found. :)

1.what is the difference between panel and placeholder?

Ans:

2.What is querystring? What are various types of querystring? explain?


3. What is session? what are their types? Explain?


4. What are Serialization?


5.What is the need of delegates?


6. Explain what are value type parameters?


7. What is difference between compiler and runtime enivornment?


8. What is CLR?


9.What do you mean by static method and dynamic method?


10.What is difference between repeater control and datagrid?


11.What is difference between Response.Write() and Console.WriteLine() ?


12.What is main difference between ASP and ASP.NET?


13.What is IIS?


14.What are the various languages supported by .NET?


15.What is an assembly?


16.What is the base class of .NET?


17.What are various types of exception handling supported by .NET?


18.Describe some of the ADO.NET features.


19.

Tuesday, May 29, 2007

Understanding VC++.NET 2nd Installment

I was a little busy in a training so was unable to post this program early.
This is a simple Windows application program.Again I would like to say the inspiration and guidance is taken from msdn.Although I have changed the program a little, just to suite my own satisfactions.I give all credit to msdn.
So here it comes...

Creating a Windows Application:


1. Create a new VS 2005 project in VC++
2. In the Project Types pane, select CLR in the Visual C++ node, then select Windows Forms Application in the Templates pane.
3. Enter the solution name and location and click OK.
4. Now drag three labels, a Datetimepicker and a button control from the tool box.
5. Set The name of the form by clicking the Text property of form as “Date chooser”
6. Set the text of the label as “Choose a date”, Visibility as true. Place this label just before the datetime picker.
7. Place the other two labels just below the first label and the datetime picker and set the visibility as false.
8. Set the text of button as “Done”.
9. Write the following code for the button click event:

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
Application::Exit();
}

10. Now, add a value cahnged event for the date time picker


private: System::Void dateTimePicker1_ValueChanged(System::Object^ sender, System::EventArgs^ e)
{
label2->Visible =true;
label3->Visible = true;
label3->Text = String::Format("new date : {0}",dateTimePicker1->Text);
}
11. Now Build the solution and run it without debugging.
12. The new Windows Form is displayed in the desired format.


Complete Program:


#pragma once

namespace FirstWindowsFormsApplication {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
///
/// Summary for Form1
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
///

public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
///
/// Clean up any resources being used.
///

~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Label^ label1;
protected:
private: System::Windows::Forms::DateTimePicker^ dateTimePicker1;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private:
///
/// Required designer variable.
///

System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

void InitializeComponent(void)
{
this->label1 = (gcnew System::Windows::Forms::Label());
this->dateTimePicker1 = (gcnew System::Windows::Forms::DateTimePicker());
this->button1 = (gcnew System::Windows::Forms::Button());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->SuspendLayout();
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast(0)));
this->label1->Location = System::Drawing::Point(1, 71);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(91, 13);
this->label1->TabIndex = 0;
this->label1->Text = L"Choose a Date";
//
// dateTimePicker1
//
this->dateTimePicker1->Location = System::Drawing::Point(109, 67);
this->dateTimePicker1->Name = L"dateTimePicker1";
this->dateTimePicker1->Size = System::Drawing::Size(200, 20);
this->dateTimePicker1->TabIndex = 1;
this->dateTimePicker1->ValueChanged += gcnew System::EventHandler(this, &Form1::dateTimePicker1_ValueChanged);
//
// button1
//
this->button1->BackColor = System::Drawing::SystemColors::GradientInactiveCaption;
this->button1->Location = System::Drawing::Point(109, 165);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(75, 23);
this->button1->TabIndex = 2;
this->button1->Text = L"Done";
this->button1->UseVisualStyleBackColor = false;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(12, 118);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(97, 13);
this->label2->TabIndex = 3;
this->label2->Text = L"You have choosen";
this->label2->Visible = false;
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(115, 118);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(35, 13);
this->label3->TabIndex = 4;
this->label3->Text = L"label3";
this->label3->Visible = false;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::SystemColors::Info;
this->ClientSize = System::Drawing::Size(318, 273);
this->Controls->Add(this->label3);
this->Controls->Add(this->label2);
this->Controls->Add(this->button1);
this->Controls->Add(this->dateTimePicker1);
this->Controls->Add(this->label1);
this->Name = L"Form1";
this->Text = L"Date Time chooser";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
Application::Exit();
}


private: System::Void dateTimePicker1_ValueChanged(System::Object^ sender, System::EventArgs^ e)
{
label2->Visible =true;
label3->Visible = true;
label3->Text = String::Format("new date : {0}",dateTimePicker1->Text);
}
};
}

Most of the code here is sytem generated.The code in italics is the only code written by me. :)

Declaration:
All credits to msdn.

mail to : archita.dash@rediffmail.com