<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/fun-with-switch-case-part-ii-ibainjzjo" -->

---
title: Fun with switch case, Part II | daily.dev
description: This post explores the switch-case structure, focusing on the default condition and its placement within the switch block. It highlights that the default...
canonical: https://daily.dev/posts/fun-with-switch-case-part-ii-ibainjzjo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Fun with switch case, Part II | daily.dev
og:description: This post explores the switch-case structure, focusing on the default condition and its placement within the switch block. It highlights that the default...
og:url: https://daily.dev/posts/fun-with-switch-case-part-ii-ibainjzjo
og:image: https://api.daily.dev/og/posts/IbAINJzJo.png
og:image:alt: Fun with switch case, Part II
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Fun with switch case, Part II

**[C For Dummies](https://daily.dev/sources/cdummies)** · 2 min read · 1 upvotes · 0 comments

## Summary

This post explores the switch-case structure, focusing on the default condition and its placement within the switch block. It highlights that the default statement is optional and can be placed anywhere in the switch block. The post also mentions that switch-case offers a primitive form of recursion.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://c-for-dummies.com/blog/?p=6263>

---

Tags: [#c](https://daily.dev/tags/c), [#recursion](https://daily.dev/tags/recursion)

[View this post on daily.dev](https://daily.dev/posts/fun-with-switch-case-part-ii-ibainjzjo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Fun with switch case, Part II","url":"https://daily.dev/posts/fun-with-switch-case-part-ii-ibainjzjo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/fun-with-switch-case-part-ii-ibainjzjo"},"datePublished":"2024-03-02T08:05:50.315Z","dateModified":"2024-05-09T08:20:02.615Z","description":"This post explores the switch-case structure, focusing on the default condition and its placement within the switch block. It highlights that the default...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/96c3fa141f4afb8c5e9065a4bac26634?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/96c3fa141f4afb8c5e9065a4bac26634?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"C For Dummies","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"C For Dummies","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ecad87fa5e3741329ed3877ac5840674","url":"https://daily.dev/sources/cdummies"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/fun-with-switch-case-part-ii-ibainjzjo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c,recursion","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"C For Dummies","item":"https://daily.dev/sources/cdummies"},{"@type":"ListItem","position":3,"name":"Fun with switch case, Part II"}]}
```

