# PetscGetVersion
Gets the PETSc version information in a string. 
## Synopsis
```
PetscErrorCode PetscGetVersion(char version[], size_t len)
```

## Input Parameter

- ***len -*** length of the string



## Output Parameter

- ***version -*** version string





## Note
For doing runtime checking of supported versions we recommend using `PetscGetVersionNumber()` instead of this routine.


## Fortran Note
This routine is not supported in Fortran.


## See Also
 `PetscGetProgramName()`, `PetscGetVersionNumber()`

## Level
developer

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/tutorials/ex17.c.html">src/sys/tutorials/ex17.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/version.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)  
