3.7 Command Line Arguments
3.7 Command Line Arguments
1
Department of CSE
Objectives
? To understand how arguments can be passed to main function. ? To give input to the program when it is executed. ? To make program execution dynamic by changing input for each run.
2
Department of CSE
Agenda
? Main Function ? Command-Line arguments
Types of arguments
? Example Programs using command-Line arguments ? Exercises
3
Department of CSE
Main Function
? All C language programs must have a main() function. ? It's the core of every program. ? It contains instructions that tell the computer to carry out whatever task your
program is designed to do. ? The main function can also have arguments
4
Department of CSE
Command-Line arguments
? Arguments to the main function is called Command-Line arguments.
? A command-line argument is the information that follows the name of the program on the command line of the operating system.
? Command-line arguments are used to pass information into a program when the program is executed.
? Eg: When we write program to append two files ,the file names are supplied when program starts executing rather than specifying it as constants.
5
Department of CSE
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- executing a vb program with command line arguments
- c command line arguments tutorialspoint
- cpsc 1011 lab 11 command line arguments structs
- 3 7 command line arguments
- arguments options and the environment
- module y the c c main and command line
- command line arguments in the c language
- unix standard i o and command line arguments
- c lab 02 command line arguments and strings
Related searches
- command line arguments java
- command line arguments cmd
- python command line arguments parsing
- command line arguments for smite
- get command line arguments python
- python command line arguments pip
- c command line arguments parser
- c command line arguments parsing
- c command line arguments example
- powershell command line arguments array
- command line arguments python
- command line arguments c