Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
Answers were Sorted based on User's Feedback
WHAT IS THE VALUE OF I BEFORE ENTERING THE SWITCH CASE???
if the values is something other than 1 , 2 , 3 there wont
be any effect, ASSUMING u have forgotton to give the curly
braces.
otherwise,
you will get an error, if the curly braces are not there
for the switch case.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / jack
the value of i that was initialized before the switch
statement remains unchanged as the switch statement does
not have flower braces.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / vinay
the value of i if we forget the mistake u done
it is i=2;
| Is This Answer Correct ? | 1 Yes | 3 No |
in linking some of os executables are linking name some of them
What is the difference between arrays and pointers?
how can you print&scan anything using just one character? :) HINT: printf,scanf similer
what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void main() { int i,j=5; i=cube(j+3); printf("i=%d",i); }
long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
18 Answers Acropolis, HCL, Intel, TCS,
what is self refrential structure
how do you programme Carrier Sense Multiple Access
What is wrong with this program statement?
What are structure members?
There is a number and when the last digit is moved to its first position the resultant number will be 50% higher than the original number.Find the number?
#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
14 Answers CDAC, GATE, NDS, TCS,
atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation