Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged switch-case
1
vote
2
answers
1
switch case
int main() { int a =50; switch(a) { default: a=45; case 49: a++; case 50: a--; case 51: a =a+1; } printf("%d",a); } my doubt is the default case is not executed here why??, what is a value of a the end??
Hira Thakur
asked
in
Programming in C
Sep 14, 2018
by
Hira Thakur
1.4k
views
switch-case
programming-in-c
1
vote
1
answer
2
Switch case
Output of the following program? #include <stdio.h> char input[ ] = "SSSWILTECH1\1\11W\1WALLMP1"; main() { int i,c; for( i=2 ; ( c=input[i] ) ! = '\0' ; i++) { switch(c) { case 'a' : putchar( 'i' );continue ... E' : case 'L' : continue; default : putchar (c); continue; } putchar( ' ' ); } putchar( '\n' ); }
Vinay Yadav
asked
in
Programming in C
Jun 29, 2017
by
Vinay Yadav
666
views
switch-case
programming-in-c
0
votes
1
answer
3
switch-case
BREAK can be used in switch-case but CONTINUE is not allowed in switch-case but CONTINUE is allowed in DEFAULT case of switch-case..is it correct??
joshi_nitish
asked
in
Programming and DS
Jun 28, 2017
by
joshi_nitish
555
views
switch-case
3
votes
2
answers
4
Kerala PSC AP Exam
What will be the output of the following C program fragment? int n =1; switch(n) { case 1: printf("One"); case 2: printf("Two"); case 3: case 4: case 5: default: printf("Wrong Choice"); } A) One B) One Two Wrong Choice C) Two D) One Two
Sankaranarayanan P.N
asked
in
Programming in C
Oct 27, 2016
by
Sankaranarayanan P.N
403
views
programming-in-c
switch-case
3
votes
2
answers
5
GATE Overflow | Programming | Test 1 | Question: 9
No. of times '*' will be printed by the following C code is _____ #include<stdio.h> void foo(int x) { switch(x){ case 1: printf("*"); case 2: printf("*"); case 3: printf("*"); default: printf("*"); } } int main() { foo(2.5); }
Arjun
asked
in
Programming in C
Oct 18, 2016
by
Arjun
1.2k
views
go-programming-1
programming
programming-in-c
switch-case
numerical-answers
77
votes
1
answer
6
GATE CSE 2015 Set 3 | Question: 48
Consider the following C program: #include<stdio.h> int main() { int i, j, k = 0; j=2 * 3 / 4 + 2.0 / 5 + 8 / 5; k-=--j; for (i=0; i<5; i++) { switch(i+k) { case 1: case 2: printf("\n%d", i+k); ... : printf("\n%d", i+k); default: printf("\n%d", i+k); } } return 0; } The number of times printf statement is executed is _______.
go_editor
asked
in
Programming in C
Feb 16, 2015
by
go_editor
22.3k
views
gatecse-2015-set3
programming
programming-in-c
switch-case
normal
numerical-answers
40
votes
5
answers
7
GATE CSE 2012 | Question: 3
What will be the output of the following C program segment? char inChar = 'A'; switch ( inChar ) { case 'A' : printf ("Choice A \ n"); case 'B' : case 'C' : printf ("Choice B"); case ... : printf ("No Choice"); } No Choice Choice A Choice A Choice B No Choice Program gives no output as it is erroneous
gatecse
asked
in
Programming in C
Aug 5, 2014
by
gatecse
10.8k
views
gatecse-2012
programming
easy
programming-in-c
switch-case
To see more, click for the
full list of questions
or
popular tags
.
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged switch-case
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...