Quantcast
Channel: interview Question – wikistack
Browsing all 34 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

what is difference between zombie process and orphan process

what is difference between zombie process and orphan process? explain each with examples in details. orphan process A process is know as orphan process when its parent process do not live. It means if...

View Article



Image may be NSFW.
Clik here to view.

How to implement “Press Any Key To Exit” in c/c++ program

Simulating “Press Any Key To Exit” is easy in windows platform. We can use getch() function to simulate it. see below example for Window machine. How to implement Press Any Key To Exit in Window System...

View Article

Image may be NSFW.
Clik here to view.

Tail Call Optimization and Tail Recursion tutorial

What is Tail Call Optimization and Tail Recursion? what is difference between normal recursion and tail recursion? Tail recursion is a  recursion where the recursive call is the very last thing in the...

View Article

Image may be NSFW.
Clik here to view.

what is power set explain with example

what is power set  explain it with example? Let me ask one question. What is set? Answer is “a set is collection of distinct objects”.  Now let us define power set. A power set is all set of subsets....

View Article

Image may be NSFW.
Clik here to view.

what is advantage of pointers over references in c++

Explain in details what is advantage of pointers over references in c++? Pointers can be reassigned while references cannot. Let us see below code pointer.cpp ( below code ) #include<iostream>...

View Article


Image may be NSFW.
Clik here to view.

how to find nth permutation of a string in c

how to find nth permutation of a string in c.write a c program to find nth permutation of a string. For example if given string is “1256” then all permutation of string “1256” would be 1 2 5 6 1 2 6 5...

View Article

Image may be NSFW.
Clik here to view.

C program to find maximum sum from root to leaf in a binary tree

Given a binary tree write a c program to find maximum sum from root to leaf in a binary tree. For example if given binary tree is as below In the above binary tree the maximum sum from root to leaf is...

View Article

Image may be NSFW.
Clik here to view.

c program to find maximum path sum in binary tree

Write a c program to find maximum path sum in binary tree. The path may starts at any node and end at any other node in the given binary tree. For example in given below binary tree the maximum path...

View Article


Image may be NSFW.
Clik here to view.

How to Prevent C program from getting killed with ctrl-c pressed

How to Prevent C program from getting killed with ctrl-c pressed, the program should not terminate. Ctrl+C is used to terminate process. Pressing Ctrl+C generates interrupt signal (SIGINT ) to a...

View Article


Image may be NSFW.
Clik here to view.

c program to print hello world without using semicolon

Write a c program to print hello world without using semicolon. This is simple programming interview question. There very simple trick , we can avoid semicolon using if key word in c or...

View Article

Image may be NSFW.
Clik here to view.

C program to Find Turning Number in an Array

Write a C program to find turning number in an array. The problem is an interview questions. You have to find maximum number which increases at a certain index in an array and immediately decreases....

View Article

Image may be NSFW.
Clik here to view.

struct and union based interview questions for experienced

Here are some important struct and union based interview questions for experienced. In C  language struct and union provides a way to pack different data types under a single tag name. The fundamental...

View Article

Image may be NSFW.
Clik here to view.

c program to replace multiple spaces with single space

Write a c program to replace multiple spaces with single space. For example if the given string is “Hello      wikistack   !” then the output should be “Hello wikistack !”. Sample c program to replace...

View Article


Image may be NSFW.
Clik here to view.

find next greater element in an array

write a c program to find next greater element in an array. For example if the given array is { 2, 3, 9, 6, 4, 8, 7 }.  The next greater of 2 is 3 , for 3 is 9 , for 6 is 8, for 4 is 8. There is no...

View Article

Image may be NSFW.
Clik here to view.

how to count the number of nodes in a linked list

In this blog post we will learn how to count the number of nodes in a linked list using c/ c++ program. to count linked list nodes we have to traverse the linked list from head to tail. It is generally...

View Article


Image may be NSFW.
Clik here to view.

c program to print linked list in reverse order

Write c program to print linked list in reverse order. This very simple linked list interview questions for the beginners. you have to reverse the sequence only. So it is different problem compare to...

View Article

Image may be NSFW.
Clik here to view.

Find similar elements from two linked lists

Write C program to find similar elements from two linked lists and return the result as a linked list. For example if the given two linked lists are 1->2->3->4->4->5->6->NULL...

View Article


Image may be NSFW.
Clik here to view.

Find magnitude pole in an array

Find magnitude pole in an array.  A magnitude pole defined as an element in an array whose left hand side elements are lesser than or equal to it and whose right hand side element are greater than or...

View Article

Image may be NSFW.
Clik here to view.

some tricky c interview questions to practice

some tricky c interview questions to practice. Learn c and c++ programming interview skill. predicting output of sample program is way of refreshing your basic concepts. 1.what could be output of below...

View Article

Basic of mutable keyword in c++

In this blog post we are going to learn basic of mutable keyword in c++. Let us see a very basic example code:/* sample.cpp */ #include <iostream> using namespace std; class Foo { public: int a;...

View Article
Browsing all 34 articles
Browse latest View live




Latest Images