Horje
how to check a condition using one line in c Code Example
how to check a condition using one line in c
#include <stdio.h>

int main()
{
    printf("Hello World\n");

    char str1[5] = "test";
    char str2 = NULL;
    printf("\nresult: %s", str1 ? "str is not empty" : "str is empty");
    printf("\nresult: %s", str2 ? "str is not empty" : "str is empty");

    return 0;
}




C

Related
int to double c Code Example int to double c Code Example
ltoa in c Code Example ltoa in c Code Example
incompatible implicit declaration of built-in function 'printf' Code Example incompatible implicit declaration of built-in function 'printf' Code Example
c bitwise invert Code Example c bitwise invert Code Example
Frequency Code Example Frequency Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8