Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


wat is output of the following

int main()
{
const int j=2;
int i;
switch(i)
{
case 1:break;
case j:break;
default:break;
}
}

Answers were Sorted based on User's Feedback



wat is output of the following int main() { const int j=2; int i; switch(i) ..

Answer / kalyan chukka

Error Generated Because Case j is invalid declaration so
error generated

Is This Answer Correct ?    15 Yes 1 No

wat is output of the following int main() { const int j=2; int i; switch(i) ..

Answer / vikash gaurav

output will be nothing.... since i will have garbage value.
once going to switch case the value will not match with any
case so default value will be executed.

Is This Answer Correct ?    10 Yes 2 No

Post New Answer

More C Interview Questions

What is the difference b/w Structure & Class?

3 Answers  


main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?

10 Answers   Ramco,


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

0 Answers  


hello friends what do u mean by BUS ERROR i got this error while i am doing my program in DATA STRUCTURES

2 Answers   Wipro,


What are the types of bitwise operator?

0 Answers  


Function calling procedures? and their differences? Why should one go for Call by Reference?

0 Answers   ADP,


Concat two string with most overlapped substring has to remove  "abcd"+ "cdef" = "abcdef

6 Answers  


Write a program to reverse a given number in c language?

0 Answers  


what is the use of a array in c

6 Answers  


how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.

2 Answers  


what is a headerfile?and what will be a program without it explain nan example?

6 Answers   Assurgent,


#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.

0 Answers  


Categories