outcome of a game of Rock, Paper, Scissors. You do not need to build the actual game; your main() function does not need to be developed player1 and Player2 will each enter Rock, Paper or Scissors.
Standard rules of who won any given match apply: Rock beats
Scissors. Scissors beats Paper. Paper beats Rock. A Draw occurs if
both players enter the same shape
The requirements of the function are as follows:
The function accepts two char arrays as input
The function outputs a single char array
The char arrays passed to the function can contain any series of characters (i.e. it accepts any word)
The function's main role is to determine who won a game of Rock, Paper, Scissors
The output char array of the function can be 1 of 4 words:
“Player1"
This is the output if Player1 won the match
“Player2"
This is output if Player2 won the match
“Draw"
This is the output if both players entered the same shape
Invalid
Write a file copy program that prompts the user to enter the name of a text file to act as the source file and the name of an output file. The program should use the toupper() function from ctype.h to convert all text to uppercase as it’s written to the output file. Use standard I/O and the text mode
Code a C program to read five integer values from data.txt to console; calculate and display the sum and average thereof. Use the following data to create your text file: 6,45,12,67,9
Ben recently joined in Coding club in his college. On the first day, he got an assignment. He needs to display the numbers as shown in the sample output. Help Ben by writing a suitable program for the pattern.
Input Format
Enter the number of rows(N) in a single line.
Constraints
1≤N≤20
Output Format
Pattern as shown in the sample output.
Sample Input 0
5
Sample Output 0
1 2 3 4 5
16 6
15 7
14 8
13 12 11 10 9
Sample Input 1
7
Sample Output 1
1 2 3 4 5 6 7
24 8
23 9
22 10
21 11
20 12
19 18 17 16 15 14 13
In the situation where there are multiple users or a networked computer system, you probably share a printer with other users. When you request to print a file, your request is added to the print buffer. When your request reaches the front of the print buffer, your file is printed. This ensures that only one person at a time has access to the printer and that this access is given on a first-come, first-served basis. Write a C program to implement the above scenario.
Write a C program that bitwise displays the short-integer value 167 on the screen.
Write the following menu driven program for the binary tree
----------------------------------------
Binary Tree Menu
----------------------------------------
1. Create
2. In-Order Traversal
3. Pre-Order Traversal
4. Post-Order traversal
5. Search
6. Find Smallest Element
7. Find Largest Element
8. Quit
Write a function that converts a mathematical expression containing parentheses from infix form to postfix form. The function should take pointers to both source infix array and destination postfix array as arguments. You may assume that the maximum array size is fixed. The infix expression will contain multi-digit positive integers only. The function must first check if the brackets in the expression are balanced. The function prototype is given below:
void infixToPostfix(char * src, char * dst);
Code a C program to read five integer values from data.txt to console; calculate and display the sum and average thereof. Use the following data to create your text file: 6,45,12,67,9. (Hint: refer to video presentation on Files and streams)
Josephus Problem using Circular Doubly Linked List. (Your program should print the remaining people in each iteration). also show output.