Posts

Showing posts from March, 2020

Basic C Questions

#include <stdio.h> int main() {     char *p = "rak";     *p = "dkfg";     printf("p = %s", p); } Output: Segmentation fault will happen. Reasons for a C++ program crash How to find Segmentation Error in C & C++ ? (Using GDB) Segmentation Fault (SIGSEGV) vs Bus Error (SIGBUS) Can you design Netflix in 45 minutes?

Basic Data structure questions

1.   Time Complexities of all Sorting Algorithms Complicated declarations in C How does free() know the size of memory to be deallocated? How to deallocate memory without using free() in C? Get the stack size and set the stack size of thread attribute in C What is Memory Leak? How can we avoid? Memory leak in C++ and How to avoid it? Virtual Memory | Questions IPC through shared memory Working with Shared Libraries | Set 1 Typical Programs in C Add two numbers without using arithmetic operators C Program to find whether a number is even or add without using arithmetic operators Volatile keyword in c language and embedded system Difference between const char *p, char const *p and char *const p Delete node in linked list without head pointer and traversing

Important Program Collection

C/C++ Greedy Algorithm Programs C/C++ Program Activity Selection Problem C/C++ Program Kruskal’s Minimum Spanning Tree Algorithm C/C++ Program for Huffman Coding C/C++ Program for Efficient Huffman Coding for Sorted Input C/C++ Program for Prim’s Minimum Spanning Tree (MST) C/C++ Program for Prim’s MST for Adjacency List Representation C/C++ Program for Dijkstra’s shortest path algorithm C/C++ Program for Dijkstra’s Algorithm for Adjacency List Representation C/C++ Program for Graph Coloring C/C++ Program for Rearrange a string so that all same characters become d distance away C/C++ Backtracking Programs C/C++ Program to print all permutations of a given string C/C++ Program The Knight’s tour problem C/C++ Program for Rat in a Maze C/C++ Program for N Queen Problem C/C++ Program for Subset Sum C/C++ Program for m Coloring Problem C/C++ Program for Hamiltonian Cycle C/C++ Program for Sudoku C/C++ Program for Tug of War C/C++ Program for (S

Stack C/C++ Programs

Stack C/C++ Programs: C/C++ Program for Introduction to Stack C/C++ Program for Infix to Postfix Conversion using Stack C/C++ Program for Evaluation of Postfix Expression C/C++ Program for Reverse a Sting using Stack C/C++ Program for Implement two stacks in an array C/C++ Program for Check for balanced parentheses in an expression C/C++ Program for Next Greater Element C/C++ Program for Reverse a stack using recursion C/C++ Program for The Stock Span Problem C/C++ Program for Design and Implement Special Stack Data Structure C/C++ Program for Implement Stack using Queues C/C++ Program for Design a stack with operations on middle element

C/C++ Programs

Matrix C/C++ Programs C Program to check if two given matrices are identical C program to find transpose of a matrix C program for subtraction of matrices C program for addition of two matrices C program to multiply two matrices C/C++ Program for Print a given matrix in spiral form C/C++ Program for A Boolean Matrix Question C/C++ Program for Print Matrix Diagonally C Program to find the number of islands C Program to find maximum size square sub-matrix with all 1s C/C++ program for the celebrity problem C/C++ Program for Print a given matrix in spiral form Program to swap upper diagonal elements with lower diagonal elements of matrix. Maximum size square sub-matrix with all 1s

Matrix Problems

[1]  Rotate a matrix by 90 degree without using any extra space [2]  Rotate a Matrix by 180 degree
1.   https://www.geeksforgeeks.org/g-fact-14/ 2.  https://www.geeksforgeeks.org/static-objects-destroyed/ 3.  https://www.geeksforgeeks.org/operator-overloading-c/ 4.  https://www.geeksforgeeks.org/overloading-new-delete-operator-c/

Qt Preparation

https://doc.qt.io/qt-5/qobject.html#Q_OBJECT For important Qt related questions. Signal & Slot Mechanism:- The Meta-Object System Using the Meta-Object Compiler (moc) The Meta-Object Compiler,  moc , is the program that handles  Qt's C++ extensions . The  moc  tool reads a C++ header file. If it finds one or more class declarations that contain the  Q_OBJECT  macro, it produces a C++ source file containing the meta-object code for those classes. Among other things, meta-object code is required for the signals and slots mechanism, the run-time type information, and the dynamic property system. The C++ source file generated by  moc  must be compiled and linked with the implementation of the class. If you use  qmake  to create your makefiles, build rules will be included that call the moc when required, so you will not need to use the moc directly. For more background information on  moc , see  Why Does Qt Use Moc for Signals and Slots? Usage moc  is t