Address of a function in C or C++ Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 17 Likes Like Report We all know that code of every function resides in memory and so every function has an address like all others variables in the program. We can get the address of a function by just writing the function's name without parentheses. Please refer function pointer in C for details. Address of function main() is 004113C0 Address of function funct() is 00411104 In C/C++, name of a function can be used to find address of function. C // C program to addresses of a functions // using its name #include<stdio.h> void funct() { printf("GeeksforGeeks"); } int main(void) { printf("address of function main() is :%p\n", main); printf("address of function funct() is : %p\n", funct); return 0; } Output: address of function main() is :0x40053c address of function funct() is : 0x400526 Comment A anksri991 Follow 17 Improve A anksri991 Follow 17 Improve Article Tags : Misc C Language Explore C BasicsC Language Introduction6 min readIdentifiers in C3 min readKeywords in C2 min readVariables in C4 min readData Types in C3 min readOperators in C8 min readDecision Making in C (if , if..else, Nested if, if-else-if )7 min readLoops in C6 min readFunctions in C5 min readArrays & StringsArrays in C4 min readStrings in C5 min readPointers and StructuresPointers in C7 min readFunction Pointer in C6 min readUnions in C3 min readEnumeration (or enum) in C5 min readStructure Member Alignment, Padding and Data Packing8 min readMemory ManagementMemory Layout of C Programs5 min readDynamic Memory Allocation in C7 min readWhat is Memory Leak? How can we avoid?2 min readFile & Error HandlingFile Handling in C11 min readRead/Write Structure From/to a File in C3 min readError Handling in C8 min readUsing goto for Exception Handling in C4 min readError Handling During File Operations in C5 min readAdvanced ConceptsVariadic Functions in C5 min readSignals in C language5 min readSocket Programming in C8 min read_Generics Keyword in C3 min readMultithreading in C9 min read Like