How to mock if statement with initializers in C

Modern programming languages (such as C++17, Go, etc.) provide a very handy feature: if statement with initializer(s). They let you declare and initialize variables that, if present, are only visible within the if block and the associated else block. In the code snippets below, the val the variable is within the scope of if-else blocks. C++17 Go However, this feature is […]