Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 9 years ago.
Improve this question
For example:
void thisIsAnExample(Hello* bye, char* name, int num, in* arr, int* sum){
GoodBye x;;
x.funName = name;
.
.
.
It doesn't mean anything. It's just an extra semicolon. You can delete it (leaving a single semicolon) without any effect on your program.
It has the meaning of an a statement followed by an empty statement.
In C each statememnt ends with ;. So a statement with a ; followed by one, is a statement followed by an empty statement.
A "double semicolon" does not have any special meaning in c. The second semicolon simply terminates an empty statement. So you can simply remove it.
Most likely a typo. Adds a null statement to your program.
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 months ago.
Improve this question
my code is not identifying type string. I am using c to program
In your calls to count_letter(), count_words() and count_scenteces() you include a unnecessary string type in the function argument.
You should only include string when declaring a variable of some sort for example:
string x = "hi";
So to fix this problem replace each instance of string text in your function calls with text.
This will reference the text variable instead of inappropriately introducing a new variable of type string into the program.
Parameter types are only put in function declarations, not function calls.
int letters = count_letters(string text);
should be
int letters = count_letters(text);
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
#include<stdio.h>
#include<conio.h>
void main()
{
printf("%d","");//printing output
getch();
}
The output is 173 .I am not getting why the output is 173.
First, you're trying to print a string as decimal integer, which means the decimal you try to print is going to be the pointer to the string (actually a pointer to the array of characters) and not the string itself. To use an individual character use single-quotes, not double-quotes.
To accomplish what you're actually trying to do, do this:
printf("%d", ' ');
Note there is an actual space between the two single-quotes.
The result will be 32, which is the decimal value for the ASCII Space character.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
Given the following function:
image_ret* minify_1(image_src img_src, CLIENT* cl) {
image_ret* img_ret;
magickminify_init();
magickminify(img_src.image_src_val, img_src.image_src_len, (ssize_t*)&img_ret->image_ret_len);
return image_ret;
}
The compiler is telling me "expected expression before ‘image_ret’" with regard to the last line. I'm sure I'm missing some fundamental aspect of syntax here, but I don't know what. Lil' help?
You need to return a value, not a type. image_ret is a type, img_ret is a poitner to a value of that type and probably what you want to return, except I see nowhere in your code where you allocate any storage to it, or initialising any of the fields except image_ret_len
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
link to the code: http://gyazo.com/f0f4004eb606607ecaa021b5e22e6e06
I am getting the following error when i am running th code.
"error: expected identifieror '(' "
I use gedit to write this code.
I would appreciate some support guys ;)
Thanks in advance!,
Vicente
There's shouldn't be a semicolon in the int main(void); declaration.
Try replacing line 4 with: int main(void) instead.
Also, please read up on C function declaration syntax
https://msdn.microsoft.com/en-us/library/c4d5ssht.aspx.
int main(void);
^you should not do this.
And you forgot to put ; after this statement -
int height=n
And also n is not declared in your program.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 9 years ago.
Improve this question
char b;
while((b=getchar()) != '.' );
{
printf("%c",b);
}
If I had the following input in stdin abcd.
it should print a then b then c then d then detect the . and terminate although its simply printing a . instead of abcd
Remove the semicolon at the end of while condition
The semicolon at the end of the while loop makes it execute only once . It does not loop at all . Your program is simple a linear program with no looping .
Otherwise your program logic is fine .