Errors are shown in the screenshot.

#include <stdio.h> void tabArray (float ** arr) // проблема с передачей массивов из функции main на вход функции tabArray. { printf("%-15s %.3f\n", str_array[0], chr_array[0]); } int main () { char str_array[9][12] = {"Moskow"}; float chr_array[9] = {11.92}; tabArray(str_array && chr_array) // Проблема вывода функции с соответствующими параметрами. return 0; } 

Closed due to the fact that off-topic participants gbg , user194374, cheops , aleksandr barakin , Streletz 7 Aug '16 at 14:11 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Community spirit, aleksandr barakin, Streletz
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Attach an error to the question on the screenshot or text. - Denis Bubnov
  • By code it is impossible to understand what you want to do. Pass two arrays? - gbg

2 answers 2

This is how it should be:

 #include <stdio.h> #include <stdlib.h> void tabArray(char (*str_array)[12], float* chr_array) { printf("%-15s %.3f\n", str_array[0], chr_array[0]); printf("%-15s %.3f\n", str_array[1], chr_array[1]); printf("%-15s %.3f\n", str_array[2], chr_array[2]); printf("%-15s %.3f\n", str_array[3], chr_array[3]); printf("%-15s %.3f\n", str_array[4], chr_array[4]); printf("%-15s %.3f\n", str_array[5], chr_array[5]); printf("%-15s %.3f\n", str_array[6], chr_array[6]); printf("%-15s %.3f\n", str_array[7], chr_array[7]); printf("%-15s %.3f\n", str_array[8], chr_array[8]); } int main(void) { char str_array[9][12] = {"Moskow", "New-York", "London", "Minsk", "Kiev", "Warszawa", "Berlin", "Tokio", "Hong-Kong"}; float chr_array[9] = {11.92, 8.406, 8.674, 1.893, 2.804, 1.711, 3.502, 13.61, 7.188}; tabArray(str_array, chr_array); } 

PS You obviously missed the lectures, where you talked about the basics of the language.

    Apparently the problem is in tabArray(str_array && chr_array) assume that you need tabArray(str_array, chr_array) so

    That and the signature void tabArray (float ** arr) does not quite fit the call