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
-2
votes
1 answer

Lefttriangle(), Righttringle(), Pascaltriangle()

Q : Write three different functions Lefttriangle(),Righttriangle(),Pascaltriangle() in a single C-program and display the triangle as asked by the user interactively. So I have tried this one. It is printing the options, then I am entering an…
Potato
  • 1
  • 3
-2
votes
1 answer

Ruby: calling a defined function

I have a ruby code that supposes to read a paragraph and find the total number of characters, words, and sentences then find the ARI (Automated Readability Index) and decide which grade level. It's my first time using ruby and i'm not sure how to…
RoL
  • 13
  • 4
-2
votes
1 answer

Address of Function Receiver Varies Between Methods

I have the following code. https://play.golang.org/p/YAa6cgtA3Vo The address of the receiver pointer varies between method calls. This is perplexing. Can anyone explain why this is the case? Do I need to pass a pointer to a receiver as an…
Peter
  • 119
  • 12
-2
votes
1 answer

Changing Case of a String

I'm new to C and am trying to write a simple function that can take in a string (or array of characters) and convert its case based on the following rules: The first character should be uppercase. The remaining characters should be lowercase. I've…
Alureon
  • 179
  • 1
  • 3
  • 14
-2
votes
1 answer

Creating and naming function with int input for later refrence

I'm trying to create a separate function which takes an integer input. I want to then insert that function I created into the main function by only calling it by the name I gave it. I must be misunderstanding something about the def() and how to…
-2
votes
3 answers

Too few arguments in function call C++

Hello I am a student learning c++ and I am just starting to learn OOP. The problem is in my MAIN however I am showing all of my files in case it is from another file. I have written my hpp and cpp file and now I am just working on my main for…
lauren
  • 65
  • 1
  • 1
  • 11
-2
votes
2 answers

Calling a function to return a string inside another function call in c

I am currently working on a program with the Dante Brooklyn II board from audinate. I am trying to use a void return function from the Dante API - foo() - that needs to have 3 various structs passed in as well as 2 strings. I have another function…
-2
votes
3 answers

c++ function isn't being called

So this is what my function declaration looks like: void mdump(char* startAdrs, char* endAdrs); In my code, here's how I'm calling it: char f = 'f'; char d[200*sizeof(int)]; mdump(&d, &f); The error I'm getting is: invalid arguments 'Candidates…
-2
votes
2 answers

Confusion with function calls

Why this function call works? The function func(int,int) is declared as taking integers but even when calling it with double is working. Why is it so? #include using namespace std; void func(int a,int b){ cout<<"a is "<
rooni
  • 1,036
  • 3
  • 17
  • 33
-2
votes
1 answer

Could not get the entered string from the stack of function

#include #include static void get_string(char *ac) { ac = (char *)malloc (1 * sizeof (char)); printf("Enter the string to count vowels and consonants in a string using pointers: "); scanf("%s", ac); } main(int…
jiju
  • 11
  • 2
  • 8
-2
votes
1 answer

How do I send an array as function argument?

So , i'm trying to make a simple program in C using arrays. int odd(int v1[],int n) { int v2[n]; int i; for (i=0;i
k3nz0
  • 7
  • 6
-2
votes
1 answer

Qt: Run function when socket connection is active

I am trying to open a pop-up window with information from a SQLite file when the file is updated through a socket connection. How can I trigger a function call when there is activity on a specific socket? Or is there a better way to go about this…
-2
votes
1 answer

Some data disapears from pointer when calling a function

[EDIT] The main problem was that the fitness of my evolution returned the same value every time after changing some int into float values. The misterious point is that i restarted the computer and it surprisingly worked again. I'm calling a function…
Kaostias
  • 321
  • 4
  • 24
-2
votes
2 answers

jasvascript call functions from different scripts

I have two different script tags,can i call function from second..like this
-2
votes
3 answers

How to assign variable in passing multiple ID's in java script function?

I try to pass two id's from my list to function, But my function unable to recognize the id's. My code as follow: