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

Write a program that converts a string like "124" to an integer 124.


write a c program to

Create an array of character strings and fill it with arbitrary strings of your choice. Pass it into a function named

“printStrings”. It should print all the strings inside the array. Note: You need to create an array of type char*.

[3:32 AM]

please help me in this


Your task is to declare a 2D array whose dimensions should be entered by the user of the program.

• Then you should initialize the array with ones (using nested loops).

• Next you have to write a function array_multiply() which takes in the array or its pointer as argument and multiplies all its entries with a user input number.

(Hint: you will also need to pass in the dimensions of the matrix to this function).

• Similarly write a function array_add() that adds a constant number to all the entries in a 2D array.

• Print the results of calling these functions. 


From a set of array elements, find the number of occurrences of each element present in the given array


Input:

5

2

4

2

5


Output


2 occurs 2 time


4 occurs 1 time


5occurs 2 time


From a set of array elements, find the number of occurrences of each element present in the given array.


Input :

5

2

4

2

5


Output:

2 occurs 2 time

4 occurs 1 time

5 occurs 2 time


Design a C program to exchange the keys. The Two friends Bob and Jim met in a bank and discussed about their secret code. They decided to exchange their passwords for further transactions. Password of Bob is "Apple" and Jim is Orange". Print the password of Jim and Bob.


Input :

Apple Orange


Output :

Orange Apple


Task 1: Convert a number string to number Write a C function str_to_float() that takes a numeric string as input and converts it to a floating point number. The function should return the floating point number by reference. If the conversion is successful, the function should return 0, and -1 otherwise (e.g. the string does not contain a valid number). The prototype of the function is given below int str_to_float(char * str, float * number); 


Task 2: Find median in a 2D array Write a function median_2d()that computes the median for a 2D numeric array (matrix). The inputs to the function are a pointer to the start of the array, and its dimensions (rows and cols). Your function should not modify the contents of the original matrix!

The function prototype is given below. float median_2d(float * ptr_array, int rows, int cols);

Domain knowledge:

The median is the middle number in a sorted, ascending or descending, list of numbers and can be more descriptive of that data set than the average. 

If there is an odd amount of numbers, the median value is the number that is in the middle, with the same amount of numbers below and above.

 If there is an even amount of numbers in the list, the middle pair must be determined, added together, and divided by two to find the median value.

Hint: In memory a 2D array is stored just like a 1D array


Write a C program to find the sum of positive negative elements in an array.


Read the four input string variables s1, s2, s3, s4 and store it in single string variable "COLLEGE" and display the string.


LATEST TUTORIALS
APPROVED BY CLIENTS