Write a C/C++ program without using the main function
Write a C/C++ program without using the main() function. We are allowed to change the entry point of the program from main() to any other function or remove the main() function altogether.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedWrite a C/C++ program without using the main() function. We are allowed to change the entry point of the program from main() to any other function or remove the main() function altogether.
This post will discuss how to determine whether two integers are equal without using comparison operators (==, !=, <, >, <=, >=) and arithmetic operators (+, -, *, /, %).
Given a binary array of size two having at least one element as zero, write a single line function to set both its elements to zero. Use of ternary operator and direct assignment of elements are not allowed.
Given a number, determine if it is even or odd without using any conditional statement (if–else) or ternary operator.
Given an integer, find its square without using multiplication and division operator. Also, the use of the power function from any programming language library is not allowed.
Given two integers, multiply them without using the multiplication operator or conditional loops.
Write a program to print a semicolon without using a semicolon anywhere in the program.
Write a program to print all numbers between 1 and N without using a loop.
What should be the if condition in the following code snippet so that output would be “Hello World”.
Given two integers, swap them without using any third variable.
Given two positive integers, implement the power function without using multiplication and division operators.
Given two numbers, add them without using an addition operator.