Write a C program to print "GfG" repeatedly without using loop, recursion and any control structure? Last Updated : 11 Oct, 2018 Comments Improve Suggest changes Like Article Like Report As we all know the concept of printing the given string repeatedly using various loops(for loop,while loop),recursion and some control structure also. But the question is how we will print the given string repeatedly i.e. infinitely without using any loops,recursion and any control structure? Examples: Input : GFG Output : GFGGFGGFGGFG...(It will print GFG infinitely). The idea is to use system() to call the program itself. While compiling, we pass the executable file name "test". We call system(test) which will execute the same program repeatedly, because system is a function which executes extern commands or executable files. CPP // The program is compiled using -O option // to produce output executable file name // as "test" #include<stdio.h> #include<stdlib.h> int main() { printf("GFG"); system("test"); return 0; } Output: It will print GFG infinitely. Comment More infoAdvertise with us Next Article Write a C program to print "GfG" repeatedly without using loop, recursion and any control structure? B Bishal Kumar Dubey Improve Article Tags : Misc C Language c-puzzle Practice Tags : Misc Similar Reads Write a C program to print "Geeks for Geeks" without using a semicolon First of all we have to understand how printf() function works. Prototype of printf() function is: int printf( const char *format , ...) Parameter format: This is a string that contains a text to be written to stdout.Additional arguments: ... (Three dots are called ellipses) which indicates the vari 2 min read How to print a number 100 times without using loop and recursion in C? It is possible to solve this problem using loop or a recursion method but what if both are not allowed? A simple solution is to write the number 100 times in cout statement. A better solution is to use #define directive (Macro expansion) CPP // CPP program to print "1" 100 times. // Prints 1 min read C Program to Print Number series without using any loop Write a C program for given two number N and K, our task is to subtract a number K from N until number(N) is greater than zero, once the N becomes negative or zero then we start adding K until that number become the original number(N). Note: Not allow to use any loop. Examples : Input : N = 15 K = 5 2 min read Print Substring of a Given String Without Using Any String Function and Loop in C In C, a substring is a part of a string. Generally, we use string libary functions or loops to extract the substring from a string and then print it. But in this article, we will learn how to print the substring without using any string function or loops.The simplest method for printing a substring 2 min read Print a character n times without using loop, recursion or goto in C++ Given a character c and a number n, print the character c, n times. We are not allowed to use loop, recursion, and goto. Examples : Input : n = 10, c = 'a'Output : aaaaaaaaaa Input : n = 6, character = '@'Output : @@@@@@ In C++, there is a way to initialize a string with a value. It can be used to p 2 min read C program to print characters without using format specifiers As we know that there are various format specifiers in C like %d, %f, %c etc, to help us print characters or other data types. We normally use these specifiers along with the printf() function to print any variables. But there is also a way to print characters specifically without the use of %c form 1 min read Print 1 to 100 without loop using Goto and Recursive-main Our task is to print all numbers from 1 to 100 without using a loop. There are many ways to print numbers from 1 to 100 without using a loop. Two of them are the goto statement and the recursive main. Print numbers from 1 to 100 Using Goto statement Follow the steps mentioned below to implement the 5 min read Print a number 100 times without using loop, recursion and macro expansion in C? It is possible to solve this problem using loop or a recursion method. And we have already seen the solution using #define directive (Macro expansion) but what if all three are not allowed? A simple solution is to write the number 100 times in cout statement. A better solution is to use concept of C 1 min read C Program to print numbers from 1 to N without using semicolon? How to print numbers from 1 to N without using any semicolon in C. C #include<stdio.h> #define N 100 // Add your code here to print numbers from 1 // to N without using any semicolon What code to add in above snippet such that it doesn't contain semicolon and prints numbers from 1 to N?We stro 2 min read Output of C programs | Set 59 (Loops and Control Statements) Prerequisite : Control StatementsQ.1 What is the output of this program?  CPP #include <iostream> using namespace std; int main() { char i = 0; for (; i++; printf("%d", i)) ; printf("%d", i); return 0; } Options a) 0 1 2 ... infinite times b) 0 1 2 ... 127 c) 0 d) 1  ans:- d Explanation : Be 3 min read Like