Awesome q2a theme
0 votes
19 views
#include<stdio.h>

int main()

{

char ch=’a’;

switch(ch)

{

case ‘a’ && 1: printf(“Hello”);

case ’b’ && 1: printf(“world”);

break;

default: printf(“GATE”);

}

}
in Programming by (6 points) | 19 views

2 Answers

+1 vote
Due to the presence of [&& 1], the program gives an error....(Compile time error).
by (22 points)
0 votes
check your syntax error else it will print GATE by default  no case is matching
by (18 points)
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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Jun 2020
  1. ummokkate

    8 Points

  2. nehaPal13

    7 Points

  3. Muktiyar

    6 Points

  4. Taraka

    6 Points

  5. pratyush12

    6 Points

  6. Radheram

    6 Points

  7. amare123

    6 Points

  8. vps123

    4 Points

  9. reboot

    2 Points

  10. Chinmay Agnihotri

    2 Points

7,414 questions
1,744 answers
10,719 comments
90,375 users