Question

What is the error/most confusing (if any) in this program?


What is the error/most confusing (if any) in this program? 

int main(){

int k= 35,2; 

Z=check(k); 

printf("\n%d", z); 

return 0; 

}

int check(m) {

int m; 

if m > 40 return 1; 

else return 0; 


  • int k = 35, z; 

  • the line with int check(m), as we need t write the data type of m 

  • the line with z=check(k); 

  • There is no error.

2 0
Add a comment Improve this question Transcribed image text
Answer #1

Option 2

Add a comment
Know the answer?
Add Answer to:
What is the error/most confusing (if any) in this program?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • any help! my program not working , there is an error but cannot solve it i...

    any help! my program not working , there is an error but cannot solve it i did this program after editing a previous program  and i tried to follow the following ; 1. Instead of printing the prime numbers from 2 to n, your program will print the first n prime numbers. 2. It will be an error if n is less than 1. Exampl: $ ./a 1 2 3 #include<stdio.h> 4 int p; // p is the global variable. 5...

  • Part D. On executing the below program, what will be the output of the following program...

    Part D. On executing the below program, what will be the output of the following program if the source file contains a line "This is a sample."? [5 marks] #include <stdio.h> int main() { char ch; int k, n=0; FILE * fs = fopen("source.txt", "r"); while(1) { ch = fgetc(fs); if(ch == EOF) break; else { for(k=0;k<4;k++) fgetc(fs); printf("%c", ch); n += k; } } printf("%d\n", n); fclose(fs); return 0; } ---------------------------------- Any one can explain the question to me...

  • In which line of the following code the first error is appeared (if any)? #include 2...

    In which line of the following code the first error is appeared (if any)? #include 2 int main() <stdio.h> 4 file p: 6 fopen("newname . txt", "rb"); *p if = (P NULL) 8 perror( "Error opening file") 9 else f while (fgetc(p)- eof) 12 13 if (feof(p)) 14 15 else 16 17 Fclose(p) 18 19 20 return e; 21 printf("%d\n", n); puts("End-of-File was not reached.) 23 O 10 0 17

  • Using C, I need help debugging this program. I have a few error messages that I'm...

    Using C, I need help debugging this program. I have a few error messages that I'm not sure how to fix. Here is the code I have: /* * C Program to Print a Linked List in Reverse Order */ #include <stdio.h> #include <stdlib.h> struct node { int num; struct node *next; }; int main() { struct node *p = NULL; struct node_occur *head = NULL; int n; printf("Enter data into the list\n"); create(&p); printf("Displaying the nodes in the list:\n");...

  • Modify the program pls so it then asks the user for another input making the program ask for a ye...

    modify the program pls so it then asks the user for another input making the program ask for a yes or no question looping it codeblocks #include <stdio.h> #include <ctype.h> #define NEWLINE '\n' int main(void) {    /* Declare variables and function prototypes. */    int k=0, formula[20], n, current=0, done=0, d1, d2;    double error=0, weight, total=0;    double atomic_wt(int atom);    /* Read chemical formula from keyboard. */    printf("Enter chemical formula for amino acid: \n");    while ((formula[k]=getchar()) != NEWLINE)       k++;    n = k;   ...

  • How can I integrate these programs into this menu template: #define _CRT_SECURE_NO_WARNINGS #include #include #include #include...

    How can I integrate these programs into this menu template: #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include void program_one (); void program_two (); void program_three (); void program_four(); void program_five(); int main() { int menu_option = 0; while (menu_option != 9) { printf(" = 1\n"); //Change this to your first program name. Nothing else. printf(" = 2\n"); //Change this to your second program name. Nothing else. printf(" = 3\n"); //Change this to your third program name. Nothing else. printf(" =...

  • //In this assignment, we use multiple threads to calculate the sum // 1*1 + 2*2 +...

    //In this assignment, we use multiple threads to calculate the sum // 1*1 + 2*2 + 3*3 + 4*4 + ... + n*n // Note we should know from CSE2500 that this sum is // n*(n+1)*(2*n+1)/6 // We a n value, we will create 2*n threads to do the calculation so that // we can have a race condition. // Before you change the code, read the code and run the code and see what // happens. Do we already...

  • I need some with this program, please look at the changes I need closely. Its running...

    I need some with this program, please look at the changes I need closely. Its running correctly, but I need to do a few adjustments here is the list of changes I need: 1. All of the integers on a single line, sorted in ascending order. 2. The median value of the sorted array on a single line 3. The average of the sorted array on a single line Here is the program: #include<stdio.h> #include<stdlib.h> /* This places the Adds...

  • Write a complete C program that inputs a paragraph of text and prints out each unique...

    Write a complete C program that inputs a paragraph of text and prints out each unique letter found in the text along with the number of times it occurred. A sample run of the program is given below. You should input your text from a data file specified on the command line. Your output should be formatted and presented exactly like the sample run (i.e. alphabetized with the exact spacings and output labels). The name of your data file along...

  • What is the output of the following c program. Why, Can you tell me how do...

    What is the output of the following c program. Why, Can you tell me how do you solve it? #include <stdio.h> int fun(int n) { if(n==0) { return 1; } else return 7 + fun(n-2); } int main() { printf("%d", fun (4)); return 0; | }

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT