Skip to content
Programmingoneonone
Programmingoneonone
  • Home
  • CS Subjects
    • IoT – Internet of Things
    • Digital Communication
    • Human Values
  • Programming Tutorials
    • C Programming
    • Data structures and Algorithms
  • HackerRank Solutions
    • HackerRank Algorithms Solutions
    • HackerRank C problems solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
Programmingoneonone

C program to call the function through the for loop

YASH PAL, 31 July 202417 October 2024

C program to call the founction through the for loop – In this tutorial, we are going to write a C program to call the function through the for loop in C Programming with practical program code and step-by-step full complete explanation.

c program to call the function through for loop
c program to call the function through for loop

C program to call the function through the for loop

#include<stdio.h>
#include<conio.h>
#include<process.h>
#include<stdlib.h>

void main()
{
    int plus(int), m=1;

    clrscr();

    for(; plus(m); m++)
    {
        printf("%3d",m);
    }
}

int plus(int k)
{
    if(k==10)
    {
        exit(1);

        return NULL;
    }
    else
        return(k);
}

Output

1 2 3 4 5 6 7 8 9
c coding problems

Post navigation

Previous post
Next post
  • How AI Is Revolutionizing Personalized Learning in Schools
  • GTA 5 is the Game of the Year for 2024 and 2025
  • Hackerrank Day 5 loops 30 days of code solution
  • Hackerrank Day 6 Lets Review 30 days of code solution
  • Hackerrank Day 14 scope 30 days of code solution
©2025 Programmingoneonone | WordPress Theme by SuperbThemes