C language Quiz: Function and Macro
Questions:21Attempts allowed:UnlimitedAvailable:AlwaysPass rate:75 %Backwards navigation:AllowedTest your C programming knowledge with this free C programming language quiz. This C language quiz...
View ArticleInitializing static variable with const variable
Multiple choice questionIs there a compilation error in the following function:int func(){ const int initial = 1; static int count = initial; return ++count; }
View ArticleInternal static variables provide private, permanent storage within a single...
Multiple choice questionDoes the count variable will keep its value or will be initialize each time the function called?int func(){ static int count = 1; return ++count; }
View ArticleInitialization of internal static variable
Multiple choice questionWhat will be the first value that the func function will return?int func(){ static int count; return ++count; }
View Articleexternal static variable default initialization
Multiple choice questionWhat value will be printed?#include <stdio.h> static int count;int main(){ count++; printf("%d", count); return 0; }
View Articlestatic storage class keyword
Multiple choice questionWhat is the 'static' keyword used for?
View Articleyou can't override a static method with a non-static
True/false questionyou can't override a static method with a non-static method. In other words, you can't change a static method into an instance method in a subclass.
View ArticleJava Static Method overridden
True/false questionIn java, static methods or members are not inherited (overridden) but they can be hidden. True or False? Example:class A { static int aStaticMember; }class B extends A{ }Class C...
View Articlejava maintains a single copy of static variable on heap
Multiple choice questionWhat will be the output of the following Java code? public class X { public static int A = 5; public static void main(String[] args) throws Exception { X x = null;...
View Article
More Pages to Explore .....