CODING
SYSTEM DESIGN
PLACEMENT PREP.
BLOG
LOGIN/REGISTER
MY ACCOUNT
LOGOUT
Changing pointer passed to a function as argument
If a function in C/C++ takes a pointer argument and we try to change it (Not the value pointed to by pointer but the pointer
[…]
Making both elements of an array zero
Given an Array of two elements one of which is 0, the other is either 0 or 1. You have to make both the elements
[…]
Output of a recursive function
What will be the output of the below function if n is positive ?
C language MCQ
What will the below function return when it is called for n=1 as fun(1). Treat is as the first call to fun function, so i
[…]
Freeing memory allocated to n-dim array using free
Yesterday we learned about how to allocate memory on heap for an n-dim array using Malloc. Today let us see how to deallocate the memory
[…]
Output of a C function
Given the following structure of Node of the Linked List: struct Node{ int data; Node *link; }; What is the purpose of the below function
[…]
Check if number is a power of 2
How will you check if a number if a power of two or not? For example: 4, 8, 1024 etc are powers of two. But
[…]
value of i++ + ++i or ++i + i ++
If the initial value of i is 2 What is the value of expression i++ + i++?
Check if number is a power of 4
Give a method to find whether an integer is a power of 4 or not.
Turn off the rightmost bit of an integer
How will you turn off the rightmost bit in the binary representation of an unsigned int number.
Load more