# PetscGetArguments
Allows you to access the  command line arguments anywhere after `PetscInitialize()` is called but before `PetscFinalize()`. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscGetArguments(char ***args)
```
Not Collective


## Output Parameters

- ***args -*** the command line arguments





## Notes
This does NOT start with the program name and IS null terminated (final arg is void)


## See Also
 `PetscFinalize()`, `PetscInitializeFortran()`, `PetscGetArgs()`, `PetscFreeArguments()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/pinit.c.html#PetscGetArguments">src/sys/objects/pinit.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/pinit.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
