---
title: "Can we declare a static function as virtual?"  
description: "Can we declare a static function as virtual?"  
author: "Anonymous User"  
published: 2011-03-28  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/667/can-we-declare-a-static-function-as-virtual  
category: "oops"  
tags: ["oops"]  
reading_time: 1 minute  

---

# Can we declare a static function as virtual?

NO,\
Reason:\
The virtual function mechanism is used on the specific object that determines which virtual function to call. Since the static functions are not any way related to objects, they cannot be declared as virtual.

## Answers

### Answer by Anonymous User

NO,\
Reason:\
The virtual function mechanism is used on the specific object that determines which virtual function to call. Since the static functions are not any way related to objects, they cannot be declared as virtual.


---

Original Source: https://www.mindstick.com/interview/667/can-we-declare-a-static-function-as-virtual

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
