How would i concatenate strings and integers.
For example
char* m = "there are ";
char* n = " days"
int x = 3;
i would like something like
char* ans = "there are 3 days"
Your help will be appreciated
Hi,
I was wondering what causes this error:
'isPrime' was declared implicitly 'extern' and later static
if i had my declarations as
static int isPrime(int n){
...
}
int doSomething(int m){
...
if (!isPrime(5))
/* do something */
}
Your help will be appreciated
Hi,
I would like to define a macro that returns 0 if it cannot open the file and returns 1 if it opens the file.
For example;
#define OPEN(fileHandle) (fileHandle = fopen("blah.dat", "r"))
I would like to use conditional logic but not sure of how to go around it. In this...
Hi,
I would like to write an fscanf statement to read the first integer value at the start of the line.This is what i was using:
int c = 0;
int sr = fscanf(inFile, "%d", &c);
I was puzzled as to why this returned a value of 1 when the line contained:
8as 12
Your help will be...
Hi,
I wanted to find out how i would point to the array arr in function get(char *p) so that i ould print the contents of this array.
Your help will be appreciated.
int main(){
char * ptr = NULL:
get(ptr);
printf("contents: %s:, ptr);
}
void get(char *p){
char [5]mm = NULL...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.