answersLogoWhite

0

How do you end a program in c?

User Avatar

Anonymous

14y ago
Updated: 8/19/2019

All C programs have a main() function, and when the end of that is reached, the program terminates, so to end a program, just type the ending curly bracket '}' to match the opening one of the main() function.

It is considered good practice to end a program with the statement 'return 0;' before the last curly bracket, to indicate that the program terminated normally.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is difference between stop and end in GWbasic?

The end command is used to end the program whereas the stop command is used to break the loop like ctrl+c. After running the program it will come as break in 20 or whatever


C program was introduced in the year?

c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.


Features of c program?

the features of a C program


How to complete this C plus plus End Of File controlled while loop program?

Add the missing parts.


What is executive a c program?

I think it is 'execution of a C program'.


C program on left factoring in compiler design?

how to create a c program for left factoring.


How do you write a C program to calculate execution time of a program using all C sorts?

To calculate the execution time of a C program using different sorting algorithms, you can utilize the clock() function from the time.h library. First, include the library at the top of your program. Before calling the sorting function, capture the current clock time using clock_t start = clock();. After the sorting is complete, capture the end time with clock_t end = clock(); and calculate the execution time in seconds using (double)(end - start) / CLOCKS_PER_SEC. This will give you the time taken by the sorting algorithm to execute.


Program for sin series in c language?

find the program in c-pgms.blogspot.com


Different parts of c language program?

what are the parts of C language program


Can you program games with c plus plus?

Yes, you can program games with C++.


Write a c program for creating a virus?

a c program for creat a virus


Write 8085 assembly language program for BCD up counter and display using 8279?

loop: mvi c,59 dcr c mov a,c daa movc,a jnz loop end