FREQUENTLY ASKED QUESTIONS
- · Write your own C program to implement the atoi() function
- · Implement the memmove() function. What is the difference between the memmove() and memcpy() function?
- · Write C code to implement the strstr() (search for a substring) function.
- · Write your own printf() function in C
- · Implement the strcpy() function.
- · Implement the strcmp(str1, str2) function.
- · Implement the substr() function in C.
- · Write your own copy() function
- · Write C programs to implement the toupper() and the isupper() functions
- · Write a C program to implement your own strdup() function.
- · Write a C program to implement the strlen() function
- · Write your own strcat() function
- · Write a C program to swap two variables without using a temporary variable
- · What is the 8 queens problem? Write a C program to solve it.
- · Write a C program to print a square matrix helically.
- · Write a C program to reverse a string
- · Write a C program to reverse the words in a sentence in place.
- · Write a C program generate permutations.
- · Write a C program for calculating the factorial of a number
- · Write a C program to calculate pow(x,n)?
- · Write a C program which does wildcard pattern matching algorithm
- · How do you calculate the maximum subarray of a list of numbers?
- · How to generate fibonacci numbers? How to find out if a given number is a fibonacci number or not? Write C programs to do both.
- · Solve the Rat In A Maze problem using backtracking.
- · What Little-Endian and Big-Endian? How can I determine whether a machine's byte order is big-endian or little endian? How can we convert from one to another?
- · Write C code to solve the Tower of Hanoi problem.
- · Write C code to return a string from a function
- · Write a C program which produces its own source code as its output
- · Write a C progam to convert from decimal to any base (binary, hex, oct etc...)
- · Write C code to check if an integer is a power of 2 or not in a single line?
- · Write a C program to find the GCD of two numbers.
- · Finding a duplicated integer problem
- · Write code to remove duplicates in a sorted array.
- · Find the maximum of three integers using the ternary operator.
- · How do you initialize a pointer inside a function?
- · Write C code to dynamically allocate one, two and three dimensional arrays (using malloc())
- · How would you find the size of structure without using sizeof()?
- · Write a C program to multiply two matrices.
- · Write a C program to check for palindromes.
- · Write a C program to convert a decimal number into a binary number.
- · Write C code to implement the Binary Search algorithm.
- · Wite code to evaluate a polynomial.
- · Write code to add two polynomials
- · Write a program to add two long positive numbers (each represented by linked lists).
- · How do you compare floating point numbers?
- · What's a good way to implement complex numbers in C?
- · How can I display a percentage-done indication on the screen?
- · Write a program to check if a given year is a leap year or not?
- · Is there something we can do in C but not in C++?
- · How to swap the two nibbles in a byte ?
- · How to scan a string till we hit a new line using scanf()?
- · Write pseudocode to compare versions (like 115.10.1 vs 115.11.5).
- · How do you get the line numbers in C?
- · How to fast multiply a number by 7?
- · Write a simple piece of code to split a string at equal intervals
- · Is there a way to multiply matrices in lesser than o(n^3) time complexity?
- · How do you find out if a machine is 32 bit or 64 bit?
- · Write a program to have the output go two places at once (to the screen and to a file also)
- · Write code to round numbers
- · How can we sum the digits of a given number in single statement?
- · Given two strings A and B, how would you find out if the characters in B were a subset of the characters in A?
- · Write a program to merge two arrays in sorted order, so that if an integer is in both the arrays, it gets added into the final array only once. *
- · Write a program to check if the stack grows up or down
- · How to add two numbers without using the plus operator?
- · How to generate prime numbers? How to generate the next prime after a given prime?
- · Write a program to print numbers from 1 to 100 without using loops!
- · Write your own trim() or squeeze() function to remove the spaces from a string.
- · Write your own random number generator function in C.*
- · Write your own sqrt() function in C