Use any statement in for initialization statement - C Statement

C examples for Statement:for

Description

Use any statement in for initialization statement

Demo Code

#include <stdio.h>

int main(void)
{
    int num = 0;//from  w  w w.j a  v a 2  s. c o  m
    
    for (printf("I am from for initialization statement!\n"); num != 6;  )
        scanf("%d", &num);

    printf("from book2s.c o m!\n");

    return 0;
}

Result


Related Tutorials