Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C Programming and #include Question 1 Write a C program to initialise the characters {r', 'a', 'd', 'a', 'r', '10'} to a character array.

image text in transcribedimage text in transcribedimage text in transcribed

Using C Programming and #include

Question 1 Write a C program to initialise the characters {r', 'a', 'd', 'a', 'r', '10'} to a character array. Print out true" if the string is a palindrome. Repeat for the string below: >> radar true >> anna true >> madam true >> mummy false Question 2 Write a C function named reverse () that reverses the words in a sentence. Hint: See strtok() in String.h Enter a sentence: you can cage a swallow can't you Reversal of sentence: you can't swallow a cage can you Question 3 Write a C program to store the results for the Tic-Tac-Toe game below using a two-dimensional character array. Print the value of each array element in the following format. Question 3 Write a C program to store the results for the Tic-Tac-Toe game below using a two-dimensional character array. Print the value of each array element in the following format. Problem Set 3.do Problem Set 4.de Question 4 Modify your program in Question 3 to count the number of X and O. Question 5 Write a Tic-Tac-Toe game in C which allows two players to alternately enter 'X' or 'O' into a two- dimensional array. Print the array after each player's move until a player wins. Player 1 >> 0,0 Player 2 >> 1,1 Player 1 >> 0,2 : : Player 1 wins ! 0 1 2 0 1 2 0 1 2 0 0 0 1 1 1 1 O O N 2 N Bonus Track (+10 Marks) Modify your C program in Question 5 to make a 3D Tic-Tac-Toe game. Tip: You need to use a 3x3x3 character array

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago