Questions tagged [function-call]

A function call is a line of code that executes a specific block of code defined as a function, that is, self-contained code that may optionally take arguments, defined for the purpose of code reuse.

A function call is a line of code that executes a specific block of code defined as a function, that is, self-contained code that may optionally take arguments, defined for the purpose of code reuse.

760 questions
-4
votes
1 answer

Intercept the function call to add a argument before an if

I made a console.log function to mimic the javascript console.log function. The problem i have is to line break after all argumets because i'm unable to detect when is a single argument call or is the last argument being called due to function…
-4
votes
3 answers

how to store return values from void in C?

How to store values from void function in main ? Example void UsartCallback (uchar* buf, uint len) { return void(*buf); } int main() { UsartCallback(&buf,1); // I can get values from void function but how to store this "*buf" value //…
user3764118
  • 65
  • 10
-5
votes
1 answer

How to pass a void function(void) in to another function as parameter in c

[enter image description here][1]I have a function void readline() which output a string, and I want to pass it into another function as a parameter, how can I do that, Thanks for any help. int scorecount(argc1, argv1, void readline()); void…
Hu Yunfei
  • 11
  • 3
-5
votes
2 answers

Why is my code returning 0.00?

#include #include float math(int, int, int, int, int, float, float, float); main() { int a, b, c, d, e; float sum, avg, sd; printf("Enter Five Integers->"); scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); math(a, b, c, d, e,…
-5
votes
1 answer

Im having issues with the redefintion of "fptr"

The 15th line is what I cant fix. Please be kind enough to look at my code and diagnose the issue. I am new to programming and will appreciate anyone pointing me in the right direction. #include #include #define TEAMS…
-5
votes
2 answers

Why i am not getting expected output while passing char to a function in C

Here is the code I have written #include main( ) { float a = 15.5 ; char ch = 'd' ; printit ( a, ch ); } printit ( a, ch ) { printf ( "\n%f %c ", a, ch ) ; } And the output is: 15.500000 ─ Here I am…
Krish
  • 1
  • 3
-5
votes
2 answers

Multiple ajax calls in jquery

I am using jquery for my project. I have the following requirements: I need to make a function call which invokes 5 other functions. These 5 functions are ajax calls which work independent of each other. The ajax calls get data from server and…
-6
votes
1 answer

Why extra value is printed using cout and printf?

Why 5 is being printed after 1.00. #include using namespace std; int main() { double x = 1; cout << printf("%.2f\n", x); return 0; } output : 1.00 5
ImBatman
  • 47
  • 8
-6
votes
2 answers

Declaring lambda with int type not working

I wanted to use the lambda function somehow, but it doesn't work, and I don't know why. vector v; /* ... */ int median = [](vector a) { sort(a.begin(), a.end()); return a[a.size() / 2]; } I created a lambda function, but how…
-7
votes
2 answers

Python code unexpected behavior when entering my loop

I am having a problem with my attack loop, when it runs it gets to the checkAtk function then restarts the direction loop. I don't have a clue what's wrong with this code (and need to fix it before next Saturday). I welcome any advice or hint you…
1 2 3
50
51