Wednesday, June 20, 2007

GK Questions (1-100)

1 What commonly used product was invented by Whitcomb Judson in 1893 but had no demand till the late 1910s when orders came for troop uniforms?
(1)Cigarette lighters
(2)Zippers
(3)Walkie Talkies
(4)Canned Soya


Ans: Zippers
2.Which famous inventor ranks second in the number of patents registered?
(1)Thomas Alva Edison
(2)James Watt
(3)Albert Einstein
(4)Edwin Land


Ans:Edwin Land
3.In terms of overall advertising spends, which country is the second largest in the world, with only the US ahead of it?
(1)UK
(2)China
(3)Japan
(4)France

Ans: Japan


4.Which organisation is the world’s largest employer?
(1)General Motors
(2)General Electric
(3)China Electric Company
(4)Indian Railways

Ans: Indian Railways
5.Which mobile phone service provider has taken over from JT Mobile and launched its services in Bangalore and Andhra Pradesh last year?
(1)BPL Mobile
(2)Orange
(3)AirTel
(4)Reliance Telecom


Ans: Airtel

6.Which air route has the highest level of international passenger traffic in the world?
(1)London-New York
(2)London-Paris
(3)NewYork-Singapore
(4)Dubai-London

Ans: London-Paris

7.This famous business personality became the youngest Vice- President at Bankers Trust company in 1990. He later went on to start a company in the emerging Internet space and was Time magazine’s Man of the Year in 1999. Who is he?
(1)Jeff Bezos
(2)Jerry Yang
(3)Kim Bessott
(4)Jim Clark

Ans:Jeff Bezos


8.Which leading Indian tyre company owns Vikrant Tyres after its takeover in the late 1990s?
(1)MRF
(2)Modi Stone
(3)Dunlop
(4)JK Tyres

Ans: JK Tyres


9.Which industrial family owns the majority stake in the successful Hero group, a leader in the motorcycle segment in the country in collaboration with Honda, Japan?
(1)Hinduja
(2)Munjal
(3)Firodia
(4)Singhania

Ans: Munjal


10.Which company launched the first mobile phone operation in India?
(1)Bharti Airtel
(2)Essar
(3)Max Touch
(4)Modi Telstra


Ans: Modi Telstra

11.Which company’s famously advertised vision statement is ‘The Network is the Computer’?
(1)Cisco Systems
(2)Lucent Technologies
(3)Sun Microsystems
(4)Nortel Networks

Ans: Sun


12.The software company I-flex Solutions was originally a division of which famous financial services company?
(1)Citicorp
(2)ICICI
(3)HSBC
(4)ABN Amro Bank


Ans:CitiCorp


13.Which former advertising personality has recently been named the Undersecretary of State for ‘public diplomacy and public affairs’ of the US in an exercise to rebrand the US following the September 11 terrorist strikes?
(1)Charlotte Beers
(2)Jay Chiat
(3)Martin Sorrell
(4)George Lois

Ans: Charlotte Beers


14.Which premium international range of luggage was recently launched in India by BlowPlast?
(1)Samsonite
(2)Strolley
(3)American Tourister
(4)Delsey

Ans:Delsey


15.This year saw the launch of Yahoo!, Amazon.com and the famous launch of the Orange mobile phone service in the UK. Which year was this?
(1)1992
(2)1994
(3)1995
(4)1993

Ans:1994


16.Henry Ford revolutionised the car market with the first mass- produced car, the Ford Model T. In which year was it launched?
(1)1924
(2)1912
(3)1908
(4)1897

Ans: 1908


17.Which company owns the beer brands Haywards 2000, Hi-Five and Lal Toofan?
(1)United Breweries
(2)Millennium Alcobev
(3)Shaw Wallace
(4)Mohan Meakins

Ans: Shaw Wallace


18.Which company owns the footwear brand - Stryde?
(1)Woodland
(2)Bata
(3)Tata International
(4)Hindustan Lever

Ans: Tata International


19.It was the brand that made David Ogilvy famous. Which shirt brand’s ads had the famous man with an eye patch in the 1950s, which catapulted David Ogilvy to fame?
(1)Van Heusen
(2)Arrow Shirts
(3)Hathaway
(4)Dockers

Ans: Hathaway


20.Which TV channel has been in the news for its coverage of the Bin Laden crisis, especially for having carried all broadcasts of Osama Bin Laden to audiences in West Asia?
(1)Star Asia
(2)BBC Asia
(3)Al Jazeera
(4)Khaleed Times


Ans: Al Jazeera



21.Who is India's ambassador to the US?
(1)Montek Singh Ahluwalia
(2)Lalit Mansingh
(3)Suraj Parekh
(4)Rajat Gupta

Ans: Lalit Mansingh

22.Novartis was born out of the merger of the following two companies
(1)Glaxo and Sandoz
(2)Ciba and Sandoz
(3)Ciba and Smithkline
(4)Smithkline and Glaxo

Ans: Ciba and Sandoz


23.Who is the chairman of Procter and Gamble Hygiene and Healthcare India Ltd?
(1)Bob Williams
(2)B V Patel
(3)Rajesh Sinha
(4)Kevin Parker

Ans: BV Patel

24.Brent Index is associated with which commodity?
(1)Crude oil prices
(2)Copper futures price
(3)Gold futures price
(4)Shipping rate index

Ans: Crude Oil Prices

25.What is the currency of Argentina?
(1)Peso
(2)Dollar
(3)Dinar
(4)Koruny

Ans: Peso


26.Which country is the famous mobile phone manufacturer head quartered?
(1)Finland
(2)Switzerland
(3)Sweden
(4)Germany

Ans:Finland

27.Which city is hosting the 14th Asian Games in 2004?
(1)Manila
(2)Busan
(3)Beijing
(4)Bangkok

Ans: Busan

28.Who is the Chairman and CEO of McCann-Erickson India?
(1)Sushil Khanna
(2)Ritujoy Chakraborty
(3)Sanjay Mukherjee
(4)Ritesh Singhal

Ans: Ritujoy Chakraborty


29.Who is the Chairman of Hindustan Lever Limited?
(1)MSV Banga
(2)Keki B Dadisheth
(3)Arun Adhikari
(4)Harish Manwani

Ans: MSV Banga


30.Who is the chairman of HDFC?
(1)Deepak Parekh
(2)Y M Deosthalee
(3)Janki Ballabh
(4)Samir Arora

Ans: Deepak Parekh


31.Who is the chairman of State Bank of India?
(1)Janki Ballabh
(2)Deepak Parekh
(3)Rajendra Pawar
(4)None of these

Ans: OP Bhatt


32.Who is the chairman of NIIT?
(1)Jerry Rao
(2)John Reed
(3)Rajendra Pawar
(4)Harish Menon

Ans: Rajendra Pawar


33.What was Reckitt & Coleman renamed as?
(1)Reckitt Benckiser (India) Ltd
(2)Reckitt Switzer (India) Ltd
(3)Reckitt Bayer (India) Ltd
(4)It was not renamed

Ans: Reckitt Benckiser (India) Ltd

34.Who is the chairman of ICICI Bank Ltd?
(1)N Vaghul
(2)K V Kamath
(3)Y C Deveshwar
(4)Lalit Gupte

Ans: KV Kamath


35.Who is the chairman of ITC Ltd?
(1)Y C Deveshwar
(2)Deosthalee
(3)Madhu Singhania
(4)Pratap C Reddy

Ans: Y C Deveshwar

36.Who is the US ambassador to India?
(1)Jack Straw
(2)Robert Blackwill
(3)John Ashcroft
(4)Peter Warburg

Ans: Robert D. Blackwill



37.Who is the Indian CEO of Cadila?
(1)Pankaj R Patel
(2)Mukesh K Khanna
(3)Dheeraj Patel
(4)None of these

Ans: Pankaj R Patel

38.Who is the founder of Dr.Reddy's Laboratory?
(1)Dr. Vinay Reddy
(2)Dr. Anji Reddy
(3)Dr. Srikumar Reddy
(4)Dr. Rama Rao

Ans: Dr. Anji Reddy

39.Who is the founder chairman of Apollo Hospitals?
(1)Dr. Anji Reddy
(2)Dr. Pratap C Reddy
(3)Dr. Vinay Reddy
(4)Dr. Anju Reddy

Ans: Dr. Pratap C Reddy

40.Who is the CEO of Euro RSCG?
(1)Shiv Ram
(2)Ishwar Judge
(3)Ishan Raina
(4)Suresh Palkiwala

Ans: Ishan Raina

41.Who is the CEO of SET - Sony Entertainment Television?
(1)Ravi Sharma
(2)Kunal Dasgupta
(3)Peter Mukerjea
(4)Alan Durante

Ans: Kunal Dasgupta

42.Who is the CEO of STAR India
(1)Ravi Sharma
(2)Kunal Dasgupta
(3)Peter Mukerjea
(4)Alan Durante

Ans: Peter Mukerjea

43.Who is the Managing Director of Cadburys India Ltd?
(1)Matthew Cadbury
(2)John Schweppes
(3)Steve Jobs
(4)William Cadbury

Ans: Mathew Cadbury

44.Who was the author of ‘Raghuvamsa’?
(1)Kannadasan
(2)Kalidasa
(3)Sivadas
(4)Shankaracharya

Ans: Kalidasa


41.Who said “Some books are to be tasted others to be swallowed, and some few to be chewed and digested”?
(1)Francis Bacon
(2)H G Wells
(3)John Steinbeck
(4)Isaac Asimov

Ans: Francis Bacon


42.How many moons (satellites) does the planet Saturn have?
(1)Twelve
(2)Ten
(3)Eight
(4)Twenty one

Ans: 10


43.Which country is called the ‘Land of cakes’?
(1)Britain
(2)Spain
(3)France
(4)Scotland


Ans: Scotland


44.Which is the birth place of Hitler?
(1)Prussia
(2)Hungary
(3)Austria
(4)France

Ans: Austria


45.One of the following countries has compulsory military service for women?
(1)Phillippines
(2)Israel
(3)Finland
(4)New Zealand

Ans: Israel

46.Which is the last letter of the Greek alphabet?
(1)Omega
(2)Sigma
(3)Zeta
(4)Chi

Ans: Omega


47.What is the other name for River Ganges?
(1)Sapthanadhi
(2)Bhageerathi
(3)Savithri
(4)Bhadravathi

Ans: Bhageerathi


48.In which year did Hitler become the Chancellor of Germany?
(1)1919
(2)1929
(3)1933
(4)1939

Ans: 1933
49.Which is the largest flightless bird?
(1)Ostrich
(2)Dodo
(3)Albatross
(4)Peahen


Ans: Dodo



50.Loggerhead, Atlantic Ridley, Painted and Green are four different species of:
(1)Dogs
(2)Snakes
(3)Turtles
(4)Dinosaurs


Ans:Tuturtles

51.Benito Mussolini was a dictator of which country?
(1)Germany
(2)Poland
(3)Italy
(4)USSR


Ans: Italy

52.Which country joined the World Trade Organization(WTO) on Dec. 11, 2001?
(1)South Korea
(2)China
(3)Russia
(4)Brazil


Ans: China

53.Slobodan miloseivc is a former president of which country?
(1)Belgium
(2)Yugoslavia
(3)Poland
(4)Albania


Ans:Yugosalavia

54.Who was the first Indian Governor-General of India?
(1)Lord Mountbatten
(2)Rajagopalachari
(3)Rajendra Prasad
(4)None of these


Ans:Rajagopalachari

55.Who wrote the famous poetic drama ‘Faust’?
(1)Leonardo da Vinci
(2)Wolfgang Von Goethe
(3)Anton Chekov
(4)Voltaire


Ans: Wolfgang Von Goethe

56.Who was the last Guru of the Sikhs?
(1)Guru Govind Singh
(2)Guru Tek Bahadur Singh
(3)Guru Nanak
(4)None of these


Ans: Guru Govind Singh

57.Which of the following terms denote the superstitious fear of the number thirteen?
(1)Thirteephobia
(2)Triskadekahobia
(3)Tridecaphobia
(4)None of these


Ans: Triskadekahobia

58.How long did the Kurushektra war last?
(1)Fourteen years
(2)27 days
(3)13 months
(4)18 days


Ans: 18 days

59.What does a Phillumenist collect?
(1)Old coins
(2)Flags of various nations
(3)Match box labels
(4)Empty cigarette boxes


Ans: Match box labels

60.The current US Secretary of Defense is:
(1)Jack Skraw
(2)John Ashcroft
(3)Colin Powell
(4)Donald Rumsfeld

Ans: Robert M Gates


61.In the context of Arms and Treaties, ABM Stands for:
(1)Anti Ballistic Missile
(2)American Ballistic Missile
(3)Anti Ballistic Menace
(4)American Ballistic Menace

Ans: Anti Ballastic Missile


62.This 800 - year old tower was shut for the last one decade for renovation and repair. Which?
(1)Eiffel Tower
(2)CNN
(3)Leaning tower of Pisa
(4)Empire State Building

Ans: Leaning tower of Pisa


63.The city of Frankfurt is in:
(1)France
(2)Germany
(3)Switzerland
(4)Sweden

Ans: Germany


64.Baramullah district is in which Indian state?
(1)Punjab
(2)Himachal Pradesh
(3)Jammu & Kashmir
(4)None of these

Ans: Jammu & Kashmir


65.Which of the following music groups is/was popularly called the ‘The Fab Four’?
(1)Grateful Dead
(2)The Beatles
(3)The Spice Girls
(4)None of these

Ans: The Beatles


66.What is the art of preserving, stuffing and mounting animals in lifelike forms called?
(1)Taxonomy
(2)Taxidermy
(3)Ikebana
(4)Haiku

Ans: Taxidermy


67.What physical phenomenon causes the spherical shape of raindrops?
(1)Gravity
(2)Friction
(3)Surface Tension
(4)Evaporation

Ans: Surface Tension


68.Adi Sankara set up four Mutts in the four corners of the country. Two are at Badrinath & Puri. Where are the other two located?
(1)Dwaraka and Kancheepuram
(2)Dwaraka and Rishikesh
(3)Dwaraka and Sringeri
(4)Sringeri and Rishikesh

Ans: Dwaraka and Kancheepuram


69.This much-talked about disease gets its name from the Greek word for coal. Which word?
(1)Cancer
(2)Alzheimer’s
(3)Parkinson’s
(4)Anthrax


Ans: Anthrax

70.Which is the third highest peak in India?
(1)Kanchenjunga
(2)Nanga Parbat
(3)Gasher Brum
(4)Dunagiri

Ans: Nanga Parbat

71.Which is the largest airport in the world?
(1)Singapore airport
(2)International airport at Kaula Lumpur
(3)Heathrow at London
(4)King Khalid at Saudi Arabia

Ans: King Khalid at Saudi Arabia

72.In which year did Alexander the great die?
(1)332 B.C
(2)328 B.C
(3)323 B.C
(4)356 B.C

Ans: 323 BC

73.In which year did Mahatma Gandhi launch The Dandi March?
(1)1924
(2)1930
(3)1941
(4)1942

Ans: 1932

74.Eugenics is the study of
(1)the development of embryos
(2)the merits of legalizing mercy killing
(3)the production of better offspring by careful selection of parents
(4)genetical composition of plant population in relation to their habitats

Ans: the production of better offspring by careful selection of parents

75.In which year did Thomas Alva Edison invent the electric lamp?
(1)1854
(2)1879
(3)1904
(4)1888

Ans: 1879

76.What is the measure of the length of a standard tennis court?
(1)54 ft
(2)28 ft
(3)84 ft
(4)78 ft

Ans: 78 ft

77.Which is the first Asian country to host the Commonwealth Games?
(1)S.Korea
(2)Japan
(3)Malaysia
(4)China

Ans: Malaysia

78.Who is the president of the World Bank?
(1)Michel Camdessus
(2)John Wolfensohn
(3)Emeka Anyaoku
(4)Jose Maria Ruda

Ans: Robert Julleck

79.Who was the first Prime Minister of Great Britain?
(1)Richard Travithick
(2)Robert Walpole
(3)Sir George Cayley
(4)Robert Peary

Ans: Robert Walpole

80.Who led the "Ocean to Sky" expedition that travelled along the Ganga (Ganges) river to its source?
(1)Sir Edmund Hillary
(2)Tenzing Norgay
(3)Chris Bonington
(4)Doug Scott

Ans: Sir Edmund Hillary

81.Hero Global is a venture promoted by the Munjal group
(1)to market Hero Honda two wheelers in the overseas market.
(2)to sell Hero bicycles in the overseas market.
(3)to build a automobile design lab of international repute.
(4)to set up company owned dealer network in India.

Ans: to build a automobile design lab of international repute

82.J. D. Power is a name associated with
(1)an independent power producing company in New Delhi.
(2)a power plant equipment manufacturing company.
(3)a automotive battery manufacturing company.
(4)an automobile customer survey organization.

Ans: an automobile customer survey organization

83.What does ICANN stand for?
(1)Internet Corporation for Assigned Names & Numbers
(2)International Center for Agro Nutrients & Nourishment
(3)Indian Council for Algorithm, Numbers & Notions.
(4)International council for Approved Names & Numbers.

Ans: Internet Corporation for Assigned Names & Numbers

84."Connecting People," is the by line of which company
(1)Philips
(2)Motorola
(3)Ericsson
(4)Nokia

Ans: Nokia

85.Which founding father pioneered the idea of a national bank?
(1)Hamilton
(2)Jefferson
(3)Washington
(4)Adams

Ans: Hamilton

86.Who was Karl Marx's main collaborator on his famous works?
(1)V I Lenin
(2)Max Weber
(3)Fredrick Engles
(4)Joseph Stalin

Ans: Fredrick Engles

87.Which of the following foreign partner / collaborator pair is not correct?
(1)HTA; J.Walter Thomson
(2)Chaitra; Leo Burnett
(3)O & M; WPP Group
(4)Mudra; DMB&B

Ans: Mudra; DMB&B

88.Hewlett Packard, the famous Computer company is named after
(1)Its promoters, Hewlett and Packard
(2)The city in which they commenced their operation initially
(3)The street in which their first office was located.
(4)None of these

Ans: Its promoters, Hewlett and Packard

89.Who's 'curve' did President Reagan use as the basis for his 'Trickle Down' economic policy?
(1)Keynes
(2)Ricardo
(3)Laffer
(4)Smith

Ans: Laffer

90.Free trade means
(1) a barter of goods without the use of hard cash.
(2)no official tariffs on trade between nations.
(3)a national policy of only trading with those nations which have ben given MFN status
(4)Using US Dollars to trade.

Ans:no official tariffs on trade between nations.

91.NAFTA is an acronym for the
(1) North American Free Trade Agreement.
(2)North American Frontier Trade Agreement.
(3) North African Free Trade Agreement.
(4)North Asian Free Trade Agreement

Ans: North American Free Trade Agreement.

92.E-commerce means
(1) European free commerce
(2) commercialization of electronics.
(3) buying, trading and/or selling goods via the internet.
(4) Buying and selling goods electronically.

Ans:buying, trading and/or selling goods via the internet.

93.The Pacific Rim countries are those which
(1) lie in Australia
(2) have climates similar to Papua New Guinea
(3) have Pacific natives.
(4)Are bordering the Pacific Ocean.

Ans:Are bordering the Pacific Ocean

94.The name of India's first electric car is
(1) Reva
(2) Kewa
(3) Shewa
(4) Lova

Ans:Reva

95.A coin with a minting error is called
(1) FIDO
(2) DIDO
(3) LIDO
(4) PIDO

Ans: FIDO

96.Power Compact” is from which company
(1) Ariel
(2) Nirma
(3) Surf
(4) Rin

Ans:Ariel

97.“Golden Eye TV is of which company ?
(1) BPL
(2) Thomson
(3) LG
(4) Onida

Ans:LG

98.Relate the following “The joy of flying” to an airline ?
(1)Sahara Airline
(2) Indian Airlines
(3) Jet Airways
(4) Kingfisher

Ans:Jet Airways

99.What does Nabisco stand for in RJR-Nabisco
(1) National Biscuit Corporation
(2) National Business Company
(3)National Biscuit Company
(4) National Business Corporation

Ans:National Biscuit Company

100.Who manufactures the ‘E-Class’ brand of cars?
(1) Mercedes
(2) Mistubishi
(3) Maruti
(4) Mahindra

Ans:Mercedes

Note: I am thankful to ascenteducation.
http://www.ascenteducation.com

Thursday, June 14, 2007

Aprajeeta - The Unbeatable

Life has its own ways.Man thinks something and things happen at their own wish.Everyone wants to take control of their own lives.All of us want that life should take turns as for our wishes...but does it happen every time.No.Our lives are not controlled by our wishes.We have no control over the incients happening .Whenever anything goes against our wishes we feel dejected.We start blamming of our luck , the unknown force which controls everything.We start feeling whole cosmos is conspiring against us.But do these feelings have any meaning?No scene in life can be rewinded , none can be edited .One has to accept whatever comes to him/her bravely.The real winners are those who win in the battel of life when all conditions were adverse.I usually used to get depressed, dejected, unhappy on small but unhappy incidents.But now I realise that how insignificant they were.By giving importance to those small things I wasted so many precious moments of my life.Today I realise that nothing has more significance in life than life itself.I have a few friends who have witnessed so many things at an young age which are enough for a person to get nervous breakdown.But they were brave enought to fight and win the fight even.You have been a source of inspiration for me."Life can give you a thousand reasons to cry, but you can give life thousand reasons to smile."

Dedicated to my friendSonali Aparajeeta .You are rocking.May god bless you.

A prayer

I will be what I will be,
I will do what I will do.
All I want to do, is stay in rythm with myself.
All I want is, to do what I do and not try to do what I don't do.

Just do what I do.
Just keep pace with myself.
Just be what I will be.
I will be what I will be-and I am now what I am.

Here is where I will devote my energy.
My power I is with me,not with tommorow.
I will work in rythm with Myself, not with what "I should be".
And to work in rythm with myself .
I must stay deeply connected to myself.
Tommorow is shallow, but today is as deep as truth.
God revealed his name to Moses,
and it was"I AM WHAT I AM".

Begging as a Profession:

Yesterday I was reading an article; the article was all about making begging as a profession.
The article was published in one of India’s reputed newspaper and cited the example of a beggar who was richer than most of professional employed people.
After reading this article I was thinking whether begging can really be taken as a profession.
And within a few seconds I got my answer. “NO”.Begging can never be taken as a profession. Reason, it will be a sheer waste of one’s talent as well as life to choose this profession. Even if the beggar in the article owned some flats in posh area of Mumbai still he and his family were staying in a “Juggi” (slum area), they had rented their house and were getting money from there, no doubt they had always 5 figure amount deposited in bank account but all this wealth was of no use for this person as well as his family, because he and his family cannot wear good and costly dresses, forget costly dresses , even though they can afford for dresses they can not even wear clean dresses. Their children cannot go to good schools even if this person can pay the tuition fees.Although the people who beg, earn a lot but they can never use that money for any thing good, because once they start using the money for their own betterment people will stop giving them penny and if they decide to start a business out of that they are no more beggars.After so much of analysis I concluded that a profession is something which ensures the growth of individual’s wealth, knowledge and social status. Any profession which fails to fulfill any one of the above criterions that is not a profession but an illusion. That is the reason there are no professional institute to train individuals for theft, crime, begging etc.So money may be an essential condition to decide a profession but it is not a sufficient condition.

I Often Wonder

The second hand in the clock ticks every second,
and with every tick life moves on.
We meet people everyday,
we talk to them and then we move on.Every day morning comes ,
we say hello to many people around us,
and then we move on.
Moving on and on is what has become our life.

I often wonder who moves on ?
Is it life which makes us move or is it we who moves life.
Everyday I see someone struggling with his/her troubles.
Everyday I see dreams in someone's eyes.
Everyday I see tears rolling down from someone's cheek.
Everyday I see someone trying to restrict tears roll down.
Everyday I see someone with determination and will.

I often wonder what makes me see all these?
Is it life who shows me these things,
or is it me who want to see life in all these.
I hope one day I will get answers to all my questions...

Jeevan Nahi Mara Karta hai

Chip Chip ashru bahaane waalon
Moti vyarth lutane waalon !
Kuch sapnon ke mar jane se,
jeevan nahin mara karta hai


Sapnaa kya hai ?
Nayan sez par,Soya hua aankh ka paani,
Aur tootna hai uska jyonJage kachchi neend jawani.
Geelee umar banaane walon! Doobe bina nahaane waalon,
Kuch pani ke bah jane se saawan nahin mara karta hai.


Mala bikhar gayi to kya hai,
Khud hi hal ho gayi samasyaa .
Aansoo gar neelaam huye to,
Samjho poori huyi tapasyaa.
Roothe divas manaane walon!
Phati kameez silaane waalon!
Kuch deepon ke bujh jaane se ,
aangan nahin mara karta hai.


Khota kuch bhi nahin yahan par.
Kewal zild badaltee pothee .
Jaise raat utaar chandani,
Pehne subah dhoop ki dhoti.
Vastra badal kar aane waalon !
Chaal badalkar jaane waalon!
Chand Khilounon ke khone se ,
bachpan nahin maraa karta hai.


Laakhon baar gagriyaan phooteen.
Shikan na aayi panghat par.
Lakhon baar kishtiyaan doobeen.
Chahal-pehal wo hi hai tat par .
Tam ki umra badhaane waalon!
Lau ki aayu ghatane waalon !
Laakh kare patjhad koshish par,
upvan nahin maraa kartaa hai .


Loot liya maali ne upvan,
Luti na lekin gandh phool ki.
Toofaanon tak ne cheda par,
Khidki band na huyi dhool kee.
Nafrat gale lagaane waalon!
Sab par dhool udaane waalon,
Kuch mukhdon ki naaraazee se ,
darpan nahin maraa karta ha.


iChip Chip ashru bahaane waalon ,
Moti vyarth lutane waalon !
Kuch sapnon ke mar jane se,
jeevan nahin mara karta hai .


Gopal Das 'Neeraj'

favorite lines

THE FAT AND THE THIN

by Emile Zola - A french Novel



1.Elms: a large deciduous tree with serrated leaves and winged fruits, found throughout northern temperate regions.


2.Plodding:Slow,poky


3.Cloaks: clothes a loose sleeveless outer garment that fastens at the neck


4.Hobnails: a short nail with a broad head that is used to protect the soles of boots


5.Peering: to look very carefully or hard, especially at somebody or something that is difficult to see, often with narrowed eyes


6.Contingents: dependent on or resulting from a future and as yet unknown event or circumstance


7.Gloom: Darkness


8.Matutinal: relating to or happening in the morning or in the early part of the day


9.Lulling: transitive verb to soothe or calm a person or animal, especially by using gentle sounds or motions


10.Repose: Relax


11.Balthazar: one of the three wise men who, according to the Bible, brought gifts to Bethlehem to honor the birth of Jesus


12.Quivered: to shake rapidly with small movements


13.Turnips: the white rounded fleshy root of the turnip that is eaten as a vegetable


14.Withered:shrunken,ill,thin

15.Anxious: nervous , worried

16.Espy : Notice

17.Countenance : approve of

18.Famished : Hungry

19.Yonder : over there

20.Grumpy : irritable

21.Stout : fat

22.Scorcher : somebody or something that scorches, a severely critical remark

23.Pondering : Thinking

24.Ardently : Passionately

25.Gendarme: a police officer in France and French-speaking countries.

26.

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

Understanding VC++.NET -1st Installment

1. C++ is a strongly typed language.
2. It is an efficient language.
3. It is an object-oriented language.
4. It is based on C.
5. Is case sensitive.
6. Golden rule of C++ is everything must be declared before being used.
7. With Visual C++ Express Edition, you can create Visual C++ .NET projects, including Windows Forms applications. You can also create C and C++ programs that conform to ANSI and ISO standards.

HelloWorld program in VC++.NET

// HelloWorld.cpp : main project file.

#include "stdafx.h" //copy in the file named "stdafx.h" at the begining of the program

using namespace System;

int main(array ^args)
{
Console::WriteLine(L"Hello World");
return 0;
}

Native C++ Program from the Command Line


1. Open the Visual Studio 2005 Command Prompt window.
2. At the command prompt, type notepad .cpp and press Enter.
3. In notepad type
#include

int main()
{
std::cout<<"This is a native c++ program." <<
C++ Program with .NET Classes with Command Prompt Compilation

1. Open the Visual Studio 2005 Command Prompt window.
2. At the command prompt, type notepad .cpp and press Enter.
3. In notepad type

int main ()
{
System: Console::WriteLine ("Hi, How are you”)
}

4. On the File menu, click Save. You have created a C++ source file.
5. On the File menu, click Exit to close Notepad.
6. At the command line prompt, type cl /Clr .cpp and press Enter.
(EH is the error handler routine.)
7. To see a list of all files in the directory named simple with any extension, type dir .* and press Enter.
8. To run the .exe program, type and press Enter.
9. The program displays this text and exits.

Note: The .Net class used here is Console from the namespace “System”.

Program 1: Creating a Text File Using Visual Studio and VC++.NET


1. Create a new VS 2005 project in VC++

2. Select CLRàSelect CLR empty Project.
3. Enter the solution name and location and click OK.
4. Right click the source folder and click on “Add Item”
5. In “Add Item”, select C++ File.cpp.
6. And write the following code:
using namespace System;
using namespace System::IO ;

int main()
{
String^ FileName = "TextFile.txt";

StreamWriter^ sw = gcnew StreamWriter(FileName);

//gcnew is used instead of new in c#
//^ is equivalent to a pointer as * in c#

sw->WriteLine("Hi! Archita!");
sw->WriteLine("You are creating a text file");
sw->WriteLine("To use it for write or writeline purpose");
sw->WriteLine("You can use this for {0} also" ,"formated output");
sw->WriteLine(DateTime::Now);
sw->Close();
Console::WriteLine(" You are using the file {0}to write",FileName);

return 0;

}
Note: The thing which I found most difficult in this exercise was to get the name of classes, properties and methods using “::” being a c# programmer I have got very comfortable with using “.” …I hope to get acquainted with “::” soon. J


7. Now build the solution using f7 key. Once the project is built now you can start the program by choosing “Start Without debugging”.

8. The text file is written on the same location as the project is:


Hi! Archita!
You are creating a text file
To use it for write or writeline purpose
You can use this for formatted output also
5/29/2007 5:08:37 PM



Declaration :
I am creating this post basically for my own reference while reading VC++.NET.
Many of the programs reffered here may resemble to the VC++.NET SDK.
I take no credit on saying that these are original programs written by me.


Sunday, May 27, 2007

Creating a .NET Windows Service using .NET3.0


1. Definition of a windows service?

Windows service is any application which starts when the computer boots up irrespective of the user. In UNIX it is called a demon process. Once a windows service is installed it can be modified using the Administrative Tool of Control Panel.
Windows Provides a Service Control Manager which controls the start, stop, pause of any given service.
Windows Service by default are run on a virtual user. “Local Service that has administrative rights on the system. The working directory will be the Windows system directory (typically C:\WINNT) and the default temp directory will typically be C:\WINNT\TEMP.
Windows services can be set up to run as any user although running as a user other than the default requires storing a password. It is important to consider that as soon as the password is changed, the service will not run unless the password provided for the service is also changed.
So, it is always preferred to use a default user for windows services, until and unless required.

2. Difference between a normal windows application and a windows service?

If an application is developed which can serve other applications it becomes service.
In the sense say if u own a Travel House and u r having app which displays rate and availability of buses on selected date. Since its limit is within your work area it is an application. But if u designed the same in such a way that it can be used by any Travel Company to design an app. which will use that info and service their clients your app becomes service.
Windows services is different from normal windows application in the sense that for windows application an exe file is enough to install but when it comes to windows services the it is installed by the utility provided by .Net called InstallUtil.exe or an MSI installer.


3. Basic points regarding windows service

a. Windows service can run without a user context.
b. Windows services are generally started when the computer boots up and can be
Started, stopped, paused, and restarted, from the services applet.
c. Windows Services can be managed programmatically and more easily in .NET using the
ServiceController component.
d. User messages are typically written to the Windows Event Log.

4. Creating a .NET Windows Service:

The service we will create does nothing really useful other than serve as a demonstration.

When the service is started we will just log relevant data in a text file at a particular location.

Following steps should be followed in order to create a service:

1. Start Visual Studio .NET and create a new project. Choose C# Project and Windows application.

2. Right Click on “MyService” and click on “Add New Item.”
3. In “Add New Item “window select “Windows Service” and name it “MyService” and click add.
4. Delete Form1.cs and Program.cs so as it is not required, so that the solution explorer looks like.
5. The Code looks something like this:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;

namespace MyService
{
partial class MyService : ServiceBase
{
public MyService()
{
InitializeComponent();
}

protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
}

protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary to stop your service.
}
}
}
6. Drag and drop timer to your service design view.
Note: Choose timer from components menu and not from Windows forms.

5. Adding Functionality to the service:

Add the following functionality to your service:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using System.Configuration;
using System.IO;



namespace TryingWindowsService
{
partial class MyService : ServiceBase
{
public MyService()
{

InitializeComponent();
}

#region Main
static void Main()
{
System.ServiceProcess.ServiceBase[] ServiceToRun;
ServiceToRun = new System.ServiceProcess.ServiceBase[]
{
new MyService()
};
System.ServiceProcess.ServiceBase.Run(ServiceToRun);
}
#endregion Main


#region start
protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
this.timer1.Enabled = true;
FileStream fs = new FileStream(@"d:\temp\windowsService.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter streamwriter = new StreamWriter(fs);
streamwriter.BaseStream.Seek(0, SeekOrigin.End);
streamwriter.WriteLine("WindowsService : ServiceStarted\n");
streamwriter.Flush();
streamwriter.Close();
}
#endregion start


#region Stop
protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary to stop your service.
this.timer1.Enabled = false;
FileStream fs = new FileStream(@"d:\temp\windowsService.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter streamwriter = new StreamWriter(fs);
streamwriter.BaseStream.Seek(0, SeekOrigin.End);
streamwriter.WriteLine("WindowsService : ServiceStopped\n");
streamwriter.Flush();
streamwriter.Close();
}
#endregion stop

}
}
6. Add Windows Installer to the service

1. To add windows installer service right click on the designer view and then click on “Add Installer” and name the file “MyServiceInstaller”
2. Add the following lines of code to “MyServiceInstaller”:
this.MyServiceInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
this. MyServiceInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem;

3. The installer code looks like:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;

namespace MyService
{
[RunInstaller(true)]
public partial class ProjectInstaller : Installer
{
public ProjectInstaller()
{
InitializeComponent();
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
}
}
}

4.Build the application


7. Installing the Windows service:

1. Open Visual Studio.NET command prompt
2. Change to bin\Release folder of the project
3. Issue the command InstallUtil.exe MyService.exe to register the service and have it create the appropriate registry entries :
InstallUtil.exe MyService.exe

4. Open the computer managementàServicesàand Check for the program is running.

5. To uninstall the service use the command:
InstallUtil.exe /u MyService.exe
For more information:
http://www.theserverside.com/discussions/thread.tss?thread_id=17304
http://msdn.microsoft.com/msdnmag/issues/01/12/NETServ/
http://en.wikipedia.org/wiki/Windows_service

Points To Ponder:
1. You can set the CanStop property for a service to false. This renders the Stop command unavailable on that particular service; if you try to stop the service from Server Explorer, the necessary menu item appears dimmed. If you try to stop the service from code, the system raises an error: "Failed to stop "
In case of doubts and clarification please feel free to mail at: archita.dash@rediffmail.com