Menu Content/Inhalt
Home arrow Programming Languages arrow C- Interview Questions arrow A switch statement cannot include a) constants as arguments
A switch statement cannot include a) constants as arguments PDF Print E-mail
Thursday, 22 February 2007

A switch statement cannot include a) constants as arguments b) constant expression as arguments c) string as an argument d) None of the above

Comments (53)Add Comment
...
written by jeyanthi, September 17, 2007
Answer s C.
...
written by Dipali, September 17, 2007
ans:d
switch statement take variable value as aegument depending on which partcular case block wlill b executed.
...
written by anjali tamanna, September 22, 2007
ans is C
...
written by a.programmer, September 23, 2007
ans : c
...
written by ektedar, September 25, 2007
answer: c
...
written by marphy, September 25, 2007
switch case only take the expression and a const or an integer, it cannt take float value also so the answer is "C".as string also it cannt take as the case. smilies/smiley.gif smilies/grin.gif
...
written by velsankar, September 27, 2007
Ans c)String as an argument.
...
written by Swapna, October 01, 2007
A switch statement can take integer constant as argument. It can't take floating point var as arg.
...
written by manohar singh, October 02, 2007
answer is C
...
written by ameermca03, October 09, 2007
ans is d:switch statement takes only integer values for excuting that perticular block or stmt
...
written by suresh.11v, October 14, 2007
answer:c
...
written by surya kameswari, October 17, 2007
switch statement can not take string as its argument.
...
written by ameer, October 26, 2007
switch statement can not take string as its argument.
so answer is-C
...
written by bhagyalakshmi, October 26, 2007
switch statement cannot take constant as its arguement
so ans is a
...
written by Satyanarayana Munaganuri, October 30, 2007
Ans: c
switch cannot accept the float,long,double,string as a argurments.
It accepts int,char only
...
written by kandula, November 03, 2007
ans:c
switch statement can take integer and set of character variables as argments.

resion:why beacse constructer must invoke at the time of object cration only.swith statement we send the argment at the time of run time.
...
written by Prabhavathy, November 16, 2007
Switch just check the condition. So it take all the statement which is given as an argument to it. The right answer is d only.
...
written by mcbhagyaraj, November 18, 2007
Ans :c
Becau format of
switch(cont)
{
case 1:
break;
...........
..........
default:
break;
}
Considering above this ,
Const is to be a value or characte or an expression .
C takes all above this as a constants,
So sting is a array of characters. not a Const
_____________________
so ANS : C
...
written by goli someshwar, July 23, 2008
switch statement works only when no.of possibilities r there. if the argument is a constant no need to goto switch statement
...
written by mahadev prakash, July 26, 2008
the ans is c
...
written by Pavneet Seehra, July 29, 2008
the ans is c
...
written by prasanthi, August 01, 2008
C smilies/cheesy.gif smilies/grin.gif smilies/cool.gif smilies/tongue.gif
...
written by Pradeep Kandalgaonkar, August 01, 2008
ans is b constant expression
...
written by madhvi, August 09, 2008
ans - c
...
written by V.Radhika, August 22, 2008
choice d is correct
...
written by prakash.m.sanap, August 23, 2008
ans is c
...
written by sachin gupta, August 25, 2008
ans c
...
written by Nan Averaa, September 05, 2008
ans is c. My opinion :All are knowing the if statement. Same as switch case, if statement is using more different type of condition. But switch case is using compare two no., or characters.
...
written by Karthi, September 19, 2008
switch statement accept int, char,enumeration values
...
written by vijendra, October 06, 2008
smilies/smiley.gifit will take string as argument always


good question at all
smilies/smiley.gif smilies/cheesy.gif smilies/cool.gif
...
written by kumar, October 14, 2008
it cannot include string as an argument .
it can handle char since it will be converted to ascii value
any mistake please do inform me
...
written by Nagendra kumar, October 14, 2008
answer is c
...
written by Stella Little Asha.S, November 01, 2008
ans s C
...
written by vidyasagarvv, November 07, 2008
answer is c as string is predefined list of characters where switch cannot pass the argument... ans : C.
...
written by satya singh subudhi, November 13, 2008
a switch statement cannot take a string as an argument.
...
written by Amit Ranjan, November 20, 2008
switch statement takes argument as either of byte, short, char, and int. So, it can't take string as argument.
Ans is C.
...
written by Ram.V, December 01, 2008
Ans: a) constants as arguments because once we declare it as constant it need not enter the Switch Statement.
...
written by uday koteswara rao, December 25, 2008
c takes argument
...
written by hema_r, January 10, 2009
answer is c
...
written by Maneesh Verma, January 20, 2009
The answer for this question is D.
...
written by sowmyanuka, February 08, 2009
i go with D its d rite one smilies/smiley.gif
...
written by Sowjanya V, February 25, 2009
Answer is C
...
written by Sowjanya V, February 25, 2009
ans is C
...
written by wow gold, April 02, 2009

Buy wow power leveling and wow power leveling
...
written by kk4kk, April 10, 2009
Answer : c
...
written by VKS, July 28, 2009
Answer C smilies/kiss.gif
...
written by prashanth7reddy, October 27, 2009
answer is "c" y because in switch statements we take arguments as varaiable and characters only
...
written by 111, October 28, 2009
ans is C
...
written by sriram1, October 30, 2009
ans is c
...
written by susha, February 05, 2010
ans:c
switch case accepts constants ,constant expression to match the cases .so the expression to switch case cannot b a string r a character
...
written by ziya, February 06, 2010
answer is d
...
written by Esha Rani, February 10, 2010
A switch statement only takes variable arguements given by user at run time.
switch cannot take constants as arguements because if arguements will be constants ,then there will not be the need of switch.
We can do the work without the switch. smilies/tongue.gif
...
written by ..........., February 12, 2010
switch can take string, integer as well as constant as an argument, so answer is d.

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

security code
Write the displayed characters


busy

Related Pages:

 
< Prev   Next >

User Login






Lost Password?
No account yet? Register

Experts Zone

Certification Zone

Syndicate

TESTING RSS

A feed could not be found at http://www.sgeek.com/option,com_rd_rss/Itemid,146/