Skip to content
Gblog Geeks Summer Carnival – The Biggest Coding Festival is Back!
The opening breeze of summer has already blown – and like always, it has come up with a lot of positive and fun vibes. Some… Read More
In Java, all methods in an interface are public even if we do not specify public with method names. Also, data fields are public static… Read More
The ASCII NUL and zero are represented as 0x00 and 0x30 respectively. An ASCII NUL character serves as sentinel characters of strings in C/C++. When… Read More
Declare “a function with argument of int* which returns pointer to an array of 4 integer pointers”. At the first glance it may look complex, we… Read More
While working with binary files, how do you measure their endianness? For example, if a programmer is making configuration file in binary format (e.g. on… Read More
A function is said to be reentrant if there is a provision to interrupt the function in the course of execution, service the interrupt service… Read More
Critical Section: When more than one processes access a same code segment that segment is known as critical section. Critical section contains shared variables or… Read More
As private, protected and public (access modifiers) affect the accessibility and scope of the field. So, the method cannot be private which are called from… Read More
In C, the only operation that can be applied to struct variables is assignment. Any other operation (e.g. equality check) is not allowed on struct… Read More
In Java, constructor of base class with no argument gets automatically called in derived class constructor. For example, output of following program is: Base Class… Read More
Size of dynamically allocated memory can be changed by using realloc(). As per the C99 standard: void *realloc(void *ptr, size_t size); realloc deallocates the old… Read More
Unlike C++, arrays are first class objects in Java. For example, in the following program, size of array is accessed using length which is a… Read More
C supports variable numbers of arguments. But there is no language provided way for finding out total number of arguments passed. User has to handle… Read More
Given an array that stores a complete Binary Search Tree, write a function that efficiently prints the given array in ascending order. For example, given an… Read More
Java does not support goto, it is reserved as a keyword just in case they wanted to add it to a later version. Unlike C/C++,… Read More
Both languages use try, catch and throw keywords for exception handling, and meaning of try, catch and free blocks is also same in both languages.… Read More