char input;
char h;
char b;
printf("enter input: ");
scanf("%c", &input);
Type: Posts; User: Jesius
char input;
char h;
char b;
printf("enter input: ");
scanf("%c", &input);
void rtrim (char * s ) {
int end;
end = strlen(s) - 1;
while(end >= 0 && s[end] == ' ')
{
end--;
}
if(end>=0 && s[end]!=' ')
{
s[end] = '\0';
code like:
if('A'<=c && c<='Z')
....
what do you want to print out?
d is counting number of '\0' in each word
when you found the node to be delete, you should break out the while,
while (!found && (current->link)!=NULL)
{
if (strcmp((current->link->last),lastName)==0)
{...
struct mystruct {
int item1, item2, item3, item4, item5, item10; // I think you get the point
} mystruct = {
item1: 1,
item2: 2,
item5: 5,
item4: 4,
};
changed this line
void arc(float c, int *arcn);
to
void arc(float *c, int *arcn);
int sum = 0;
for(i = 0; i<arrLen; i++)
{
sum+=sum*10+_array[i];
}
You have stored the text in the array, you can use it directly.
function startcomedi have two args:
int startcomedi(unsigned int subdevice,comedi_t *device);
but when you call it, you only pass one arg to it.
as the code you pasted, you should use method 1.
it should be changed.
*dnptr1=*((*doublenode)sinptr1);
should be
*dnptr1=*((doublenode *)sinptr1);
you can use strcmp to convert the month:
char month[10];
if(!strcmp(month,"November"))
{
info[counter].bDate.month = 11;
}
typedef struct
{
int number;
}Number;
int fun(Number num1,Number num2)
{
return (num1.number-num2.number);
}
just sort the array in descending order, then put it out .
selection_sort(10, a[i]);
it is wrong when you call selection_sort like this. the sec arg of this function is "int *"
just "=" is ok for each array element;
you can also use memcpy, memcpy(WordCopy,Word,MAXWORDS);
i was confused...
"" is a string literal, include '\0' at the end.
i was confused really..
u can malloc a buffer first, and test if the buffer is full, if it is full, then u can relloc the buffer
in this case, they are the same, u don't know whether the arg is a array or a string
yes, you can compare them directly
got it...
define array c longer length.
int c[255] = {0};
then when you do " a[5] = {4,4,4,4,4,4}+b[5] = {4,4,4,4,4,4};"
the result put into c can be begin from 0,
like c[0] = a[4]+b[4],c[1] =...