What is the output ?


If the break is replaced by continue, what is the output ?


#include <stdio.h>

int main() {
        int i;

        for (i = 0 ;; i++) {
                i = i + 2;
                printf ("output : %d\n", i);
                break;
        }
        return 0;
}
             

Answer :

a) No output and program stops.
b) No output and programs runs indefinitely.



Comments

Popular posts from this blog

RUN JAVA PROJECT IN ANDROID STUDIO

Reverse string without using temp

Are you sure your NDK_MODULE_PATH variable is properly defined ?