Questions: 1 680

Answers by our Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

The following is a two-dimensional character array of size 12X12 which represents a maze. The symbol ‘#’ represent a wall of the maze and the symbol ‘.’ represents a possible path. There is an entry point and exit point of the maze, which are denoted by a ‘.’ Write a C program which takes text file which contains the maze as command line argument and prints the minimum number of moves required to go from entry to exit. If there is no path from entry to exit display “-1”. You need to formulate the maze as a graph and use Breadth First Search to find shortest path from entry to exit. You can treat each cell as a vertex and if we can go from one cell to other cell with one move add edge between the corresponding vertices. For example, for the below maze:

############

. . . ##. ##. . .# 

##. . . . . . . .## 

#. .######. ##

####. . . . . . .#

# . . . .#. ###.#

###. . . . . . . .#

#. . .######. #

#####. . .#. .#

#. . .#. #. #. ##

#.#. . .#. . . . .

############

Min moves: 22 


47:06



1 / Sample code to read input and write output



3- /"



4 #include <stdio.h>



6 int main() 7- (



char name[20]; scanf("%s" name);



printf("hello Ns", hame);



return 0;



77 Warning: Printing unwanted or-111-forestal dete to outati che th



#include<stdio.



Read Input from STOIN



19 int main()



20- ( 21 22 23 3



11 Write your code here return p



I



21°C Rain showe

Communication Technologies have influenced history. Even




now, ICT is playing a big role. To have a creative take on the topic, compose a poem inspired by




current issues, changes, or trends we are exposed to because of ICT. Write your poem on the




space provided.

Sum Cubes

by CodeChum Admin

The square of an integer refers to the result of multiplying the integer with itself once. While the cube of an integer refers to the result of multiplying the integer with itself twice. As long as you know that, you could easily solve this!


Instructions:

  1. Input three integers and compute the cubes of each of them.
  2. Check if the sum of the cubes are positive. If it is, print out "Positive", and if not, print out "Negative".

Input


1. First integer

2. Second integer

3. Third integer

Output


The first three lines will contain message prompts to input the three integers.

The last line contains "Positive" or "Negative"


Enter the first integer: 1
Enter the second integer: 2
Enter the third integer: 3
Positive


Enter the first integer: 1
Enter the second integer: -5
Enter the third integer: 4
Negative

Create a C program to find the total number of of illiterate men and women from the population in the town.If the percentage of men is 54 from the population, and total literacy is 80% from the population.Then the total population is input to the keyboard.

Write a C program to count the number of non-zero elements and sum of upper triangular


in a two-dimensional matrix using function. [Hint function should accept 2D array as


argument.]




write a c program to define a structure called a car. the member elements of the car structure are model(like bmw, ford...etc), production year (1999,2020,...), and lastly price. create an array of 10 cars. get input for all 10 cars from the user. then the program display complete information (model, year, price) of those cars only which are above 250000 in price or production date bigger than 2000.



5. Input Combination

by CodeChum Admin

We’ve tried adding together integers, so how about adding characters as well? Well, we can’t do that with the knowledge we have now, so let’s use placeholders to do the trick!


Instructions:

  1. Input two characters in one line, separated by a space.
  2. Make the characters be printed out like it’s concatenated by printing it without spaces in between using placeholders. Refer to the sample output for your reference.
  3. In your scanf, don't forget to add a space in between the two placeholders for the characters because if you don't, the character that will be scanned for the second variable would actually be the space in between the two characters (because a space is also a character).

Input


1. First character

2. Second character

Output


The first two lines will contain message prompts to input the two characters.

The last line contains the two characters together.


Enter·the·first·character:·A

Enter·the·second·character:·B

AB


Decimal x Decimal

by CodeChum Admin

Now that we're done with integers, we're moving on to decimals!


Instructions:

  1. Input three decimal numbers in one line separated by spaces, and make sure to store them in different variables.
  2. Multiply the 1st and 2nd decimal numbers, and store the product into a variable.
  3. Then, divide the product of the 1st and 2nd decimal numbers with the 3rd decimal number, then print out its quotient.

Input


1. First decimal number

2. Second decimal number

3. Third decimal number

Output


The first three lines will contain message prompts to input the three decimal numbers.

The last line contains the result in two decimal places.


Enter·the·first·number:·1.53

Enter·the·second·number:·2.25

Enter·the·third·number:·1.23

Result·=·2.80




write a program to define a structure called a car. the member elements of the car structure are model(like bmw, ford...etc), production year (1999,2020,...), and lastly price. create an array of 10 cars. get input for all 10 cars from the user. then the program display complete information (model, year, price) of those cars only which are above 250000 in price or production date bigger than 2000.

LATEST TUTORIALS
APPROVED BY CLIENTS