Write a C program to illustrate function with no argument and no return value.
/* function with no argument and no return value */
void funWithNoArg() {
printf("Function with no argument and no return value\n");
}
int main() {
int i = 0;
/* calls function funWithNoArg() 5 times */
while (i <= 5) {
funWithNoArg();
i++;
}
return 0;
}
Output:
jp@jp-VirtualBox:~/$ ./a.out
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
Function with no argument and no return value
No comments:
Post a Comment