Repository navigation
Expand file tree
/
Copy pathcomplete_round_1.csv
More file actions
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 1.
68 lines (68 loc) · 13.4 KB
/
Copy pathcomplete_round_1.csv
File metadata and controls
68 lines (68 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<b>Swap 2 numbers without using extra variable(<i>without using 3rd variable</i>)<b><div id="in">Ingredients:-'+','-','*','/'</div>
<b>Multiply by 2(<i>Without using arithmetic operator</i>)<b><div id="in">Ingredients:-Using bitwise operator</div>
<b>Multiply by 4(<i>Without using arithmetic operator<i/>)<b><div id="in">Ingredients:-Using bitwise operator</div>
<b>Multiply by 8(<i>Without using arithmetic operator<i/>)<b><div id="in">Ingredients:-Using bitwise operator</div>
<b>Suppose you are given a number find the least number greater than or equal to that number which is multiple of 8 (<i>Using loop and increment operator</i>)</b><div id="in">Ingredients:-any loop,++</div>
<b>Suppose you are given a number find the least number greater than or equal to that number which is multiple of 8 (<i>Without using LOOP and increment operator</i>)</b><div id="in">Ingredients:- /,*,+,-</div>
<b>Write a function such that it must return true if argument is non-zero and false if zero(<i>definition should be only 1 line of code)</b><div id="in">Ingredients:-Type Casting</div>
<b>Divide by 2(<i>Without using / (division operator)</i>)</b><div id="in">Ingredients:-Bitwise Operator</div>
<b>Divide by 4(<i>Without using / (division operator)</i>)</b><div id="in">Ingredients:-Bitwise Operator</div>
<b>Divide by 8(<i>Without using / (division operator)</i>)</b><div id="in">Ingredients:-Bitwise Operator</div>
<b>Make 'a' variable value zero(<i>Without using = (assignment operator)</i>)<div id="in">Ingredients:- -=,+=</div></b>
<b>Make 'a' variable value zero(<i>Without using = (assignment operator ) or - (subtraction) operator</i>)</b><div id="in">Ingredients:-Bitwise Operator</div>
<b>Add 'a' and 'b' using only single operator(<i>Considering ‘=‘ as operator</i>)</b><div id="in">Ingredients:- Shorthand Operators</div>
<b>Subtract 'b' from 'a' using only single operator(<i>Considering ‘=’ as operator</i>)</b><div id="in">Ingredients:-Shorthand Operators</div>
<b>Find remainder of integer ‘a’ when divided by integer ‘b’(<i>without using modulo (%) operator</i>)</b><div id="in">Ingredients:-'/','*','+','-' </div>
<b>write a function to parse ascii string to integer (<i>Without using inbuilt function atoi()</i>)</b><div id="in">Ingredients:-loops,pow,Arithmatic operators</div>
<b>write a program to print a string with double quote on screen (<i>Using escape character</i>)?</b><div id="in">Ingredients:- Escape Character</div>
<b>assign value 5 to ‘a’ if ‘b’ is equal to 5 assign 10 to ‘a’ otherwise (<i>Without using if-else and switch case</i>).</b><div id="in">Ingredients:- Conditional Operator</div>
<b>To find sum of two integers (<i>Without using ‘+’ operator</i>)?</b><div id="in">Ingredients:- '-','(',')','[',']' </div>
<b>Let char A[5]=”Apple” print “pple” (<i>Without using any inbuilt function or for loop</i>)</b><div id="in">Ingredients:-using [] operator</div>
<b>Let char A[5]=”Carrom” print 4th character (<i>Without out using index</i>)?</b><div id="in">Ingredients:-using * operator</div>
<b>Find 1st complement of the number ?</b><div id="in">Ingredients:- Bitwise Operator </div>
<b>write a function to swap two numbers?</b><div id="in">Ingredients:-pass by reference</div>
<b>write a function that returns void and add two number and result should be hold by 1st number?</b><div id="in">Ingredients:- pass by reference</div>
<b>To check if two numbers are equal <i>without</i> using <i>arithmetic operators</i> or <i>comparison operators.</i></b><div id="in">Ingredients:- Bitwise Operator</div>
<b>Program to find Maximum and minimum of two numbers <i>without</i> using any <i>loop, condition, recursion or function.</i></b><div id="in">Ingredients:- Arithmetic Operators</div>
<b>Program to check number is whether EVEN or ODD <i>without</i> using any <i>arithmetic or relational operators.</i></b><div id="in">Ingredients:- Bitwise Operator </div>
<b>Program that has ANY predefined char array defined, say char arr[]= "Welcome to Techtonic", and program prints the characters inside it till it encouters the first <space>, without calculating the number of characters of first word/complete array by any method & <i>without using 'if'/'switch' statement.</i></b><div id="in">Ingredients:- Use Loops</div>
<b>Write a c++ program having data members as 2 integers, say 'x' & 'y'. Write a SINGLE constructor that takes arguments of SAME NAMES 'x' & 'y' and sets those values to class variables 'x' & 'y' respectively, or sets both of them to '0'(zero) if no argument is passed while creating an object. Also write a simple display function to print values of 'x' & 'y'.</b><div id="in">Ingredients:- Use <b>THIS</b> pointer</div>
<b>Program to add two binary numbers <i>WITHOUT USING</i> '+' operator. Take the two binary numbers as input from user, preferably store them in data type 'long'.</b><div id="in">Ingredients:- Bitwise, Modulo Operators</div>
<b>Program to multiply a number by 7 <i>without using '*' or '/' operators.</i></b><div id="in">Ingredients:- Bitwise Operators</div>
<b>Program to multiply a number by 3 <i>without using '*' or '/' operators.</i></b><div id="in">Ingredients:- Bitwise Operators</div>
<b>Multiply two integers <i>without</i> using <i>multiplication, division and bitwise operators, and no loops</i>. Take the two numbers as input from user.</b><div id="in">Ingredients:- Use '+' and '-' Operators & recursion</div>
<b>Subtract one number from other <i>without using '-' or '--' operators</i>. Take two numbers as input from user</b>div id="in">Ingredients:- Bitwise Operator</div>
<b>Write a program to find factorial of any natural number <i>without using any explicit loop, stack or recursion.</i><b><div id="in">Ingredients:- <math.h> library has a "tgamma(<int/float/double>)" function.</div>
<b>Program that has a pre-defined char array, say arr[]="Welcome to Techtonic" (can be changed inside source code), and print it removing all spaces. e.g "Welcome to Techtonic" will be printed as "WelcometoTechtonic", <i>WITHOUT</i> using <i>'if'/'switch' statement</i>, or any <i>function from <string></i> library<b><div id="in">Ingredients:- Use '\0' at the end of char array while defining it, if needed. Loops</div>
<b>Find the sum of two numbers by using a macro (#define)</b><div id="in">Ingredients:- Macros</div>
<b>Find the difference of two numbers by using a macro (#define)</b><div id="in">Ingredients:- Macros</div>
<b>Find the product of two numbers by using a macro (#define)</b><div id="in">Ingredients:- Macros</div>
<b>Find the division of two numbers by using a macro (#define)</b><div id="in">Ingredients:- Macros</div>
<b>Reverse a string without using strrev() & strlen() function</b><div id="in">Ingredients:- Loops</div>
<b>Sort 5 character arrays(strings) in Lexicographical Order(Dictionary order) <i>without</i> using <i>strcmp()</i> function & <i>without ‘string’ datatype</i> (use char [ ]) type.</b><div id="in">Ingredients:- Loops</div>
<b>Define a character array of any length, having any content, say arr[]=”Welcome to Techtonic”. Find the length of ‘arr’ <i>without using strlen() or sizeof().</i></b><div id="in">Ingredients:- Loops</div>
<b>Take two numbers as input from user into variables, say ‘x’ & ‘y’ and store the larger number of the two in any variable, say ‘z’ <i>without using if/switch statement or without using any predefined functions like max()</i> and then print ‘z’ (the larger number).</b><div id="in">Ingredients:- Ternary Operator</div>
<b>Take a string input from user. Encrypt it in such a way that you replace all ‘a’ by ‘@’ and all ‘i’ by ‘!’ and print it. The string may contain spaces. Display the encrypted string.</b><div id="in">Ingredients:- Use getline() function from <string.h> header</div>
<b>Take two inputs from user as ‘base’ and ‘exponent’. Find the value of base^exponent (base raise to exponent) <i>without using pow() function.<div id="in">Ingredients:- Recursion</div>
<b>Take integer array of 10 numbers from user. Find its average are print the number which is nearest to the average, out of all numbers from the array.</b><div id="in">Ingredients:- Loops</div>
<b>Find GCD of two numbers <i>without using recursion.</i></b><div id="in">Ingredients:- Use Comparison & Arithmetic Operators</div>
<b>Find LCM of two numbers <i>without using recursion & GCD.</i></b><div id="in">Ingredients:- Use Ternary & Modulo Operators</div>
<b>Print factors of a number <i>without using loop</i> and <i>passing only single parameter</i> to the function for factors from main(), also <i>don’t use any other function for making a call to the recursive function.</i></b><div id="in">Ingredients:- Set Default parameter in definition</div>
<b>Write a recursive function that prints numbers 0 to 5 (recursively, ofcourse) and call it in main() <i>without passing any parameter.</i> Also <i>don’t use any other function for making a call to the recursive function.</i></b><div id="in">Ingredients:- Set Default parameter in definition</div>
<b>Print the ASCII value of any character (of your choice) <i>without using even a single variable.</i></b><div id="in">Ingredients:- Use <i>Typecasting</i></div>
<b>Print any string, say “Welcome to Techtonic” <i>without using semicolon(;)</i> in the statement.</b><div id="in">Ingredients:- Use Conditional statement</div>
<b>Print two string using <i>if & else statement both</i>, of the SAME IF-ELSE block. Eg. print “Hello” using ‘if’ and “World” using else.</b><div id="in">Ingredients:- Use </i>BOTH IF & ELSE</i></div>
<b>Take <i>unknown number</i> of <i>integer inputs</i> from user, into an <i>int</i> variable. Define a variable <i>‘count’</i> to keep a count of number of inputs. <i>Stop taking inputs</i> when user enters a <i>‘character’</i>(other than numbers). Print the ‘count’.</b><div id="in">Ingredients:- Loops</div>
<b>Concatenate two strings <i>without</i> using <i>strcat() function or <i>‘string’</i> data type.</b><div id="in">Ingredients:- Loops and '\0' character</div>
<b>Define an array of 5 elements (elements of your choice). Find the sum of those array elements <i>without using loop or recursion</i></b><div id="in">Ingredients:- Goto</div>
<b>Take any predefined charater array(string) or your choice, <i>having spaces and all lower characters</i>, say arr[]=”welcome to techtonic”. Convert <i>last character</i> of each word to <i>uppercase</i> and print the newly formed string.</b><div id="in">Ingredients:- toupper(<char>) function takes a single character input and returns ASCII value of UpperCase of the character passed to it.</div>
<b>Take <i>few zero & non-zero</i> numbers in an integer array, say arr[]={23,9,0,43,0,0,21,0}. Convert each digit to <i>‘0’</i> if number is <i>zero</i> or <i>‘1’</i> if number if <i>non-zero without using arithmetic operators</i> or <i>directly assigning the respective values</i> and print the array.</b><div id="in">Ingredients:- <i>Typecase</i> to boolean using syntax: <i>(bool)</i>, just as you typecast to int, float, etc.</div>
<b>Take a string<i>(no spaces)</i> of <i>‘0’ & ‘1’</i> (zeros and ones) from user. Count the number of times a pattern <i>‘101’</i> appears in the string, by scanning the string <i>RIGHT TO LEFT</i> (END TO START). Display the count.</b> <div id="in">Ingredients:- ‘string’ data type can be used.<br>If you declare ‘string str’, then str.length() returns length of string.<br>Compare single character using single inverted commas ( ‘ ‘ ).</div>
<b>Take a string input from user<i>(spaces allowed).</i> Count the number of alphabets <i>without</i> using <i>isalpha()</i> function. Print the count.</b><div id="in">Ingredients:- (1) ASCII values of: <i>A=65, Z=90; a=97, z=122.</i><br>(2) If you declare ‘string str’, then <i>str.length()</i> returns <i>length</i> of string.</div>
<b>Take a string input from user<i>(spaces allowed)</i>. Count the number of digits(numbers) <i>without</i> using <i>isdigit()</i> function. Print the count.</b><div id="in">Ingredients:- (1) ASCII values of: <i>0(zero)=48, 9(nine)=57.</i><br>(2) If you declare ‘string str’, then <i>str.length()</i> returns <i>length</i> of string.</div>
<b>Take a string input from user<i>(spaces allowed)</i>. Count the number of spaces without using <i>isspace()</i> function. Print the count.</b><div id="in">Ingredients:- If you declare ‘string str’, then <i>str.length()</i> returns <i>length</i> of string.</div>
<b>Take a string input from user<i>(no spaces allowed)</i>. Check the string character by character, if you encounter a <i>LOWERCASE VOWEL</i>, make it <i>UPPERCASE, without</i> using <i>toupper()</i> function.</b><div id="in">Ingredients:- Difference between <i>Uppercase ASCII</i> and <i>lowercase ASCII</i> codes is <i>-32</i> (eg. A=65 & a=97).</div>
<b>Take a string input from user<i>(no spaces allowed)</i>. Toggle the case of each character of the string <i>without</i> using <i>islower(), isupper(), tolower(), toupper().</i></b><div id="in">Ingredients:- ASCII values of: <i>A=65, Z=90; a=97, z=122.</i></div>
<b>Take any number ‘n’ as an input. Check for the <i>highest power of 2</i> that is <i>less than or equal</i> to <i>‘n’</i>, <i>without using pow()</i> function.</b><div id="in">Ingredients:- Use Left shift and Arithmetic Operators</div>
<b>Take input ‘year’(4 digit) from user and check if it is a <i>leap year</i> or not, <i>without using modulo division<i> (%) operator. Print the result (leap/non-leap year).</b><div id="in">Ingredients:- Dividend=(Divisor*Quotient)+Remainder</div>
<b>Take input number ‘n’ from user. Calculate <i>square</i> of the number ‘n <i>without</i> using <i>division(/), multiplication (*)</i> operators or unbuilt functions like <i>pow().</i></b><div id="in">Ingredients:- Use (+) Operator</div>