Alternatively, you could go...
void check (int number)
{
for( ; ;number++ )
if(number % 10 == 0)
return; /* don't need a value here */
} Hoping to get certified..in C programming.
you could use gotoxy(x, y) function in C, but only if your compiler supports the #include file <conio.h>
#include <conio.h>
#include <stdio.h>
int main (void)
{
printf("The first line\n\n");
printf("note the cursor position now\n");
printf("Hit any key and...
...by reference compared to by value....not the use of the ampersand ( & ) in the call to refer_check function and the use of the pointer symbol ( * ) in the function and in the prototype and definition.
#include <stdio.h>
#include <string.h>
void refer_check(char *array, int *num);
void...
reading your question again, do you just require to check if the character stored in a member are numeric.
If so then look at the functions isdigit(), isalpha() in lib <stdlib.h>
if(isdigit(str.ch)) printf("character %c numeric", str.ch);
else printf("character %c...
see my answer to post "alternatives", espeically point on concatenation where destination string needs to be big enough to hold both strings. Hoping to get certified..in C programming.
try fflush(stdin);........you dont say what the prompts ask for int or char value. there are a number of different ways to read charcters, some of which are compiler and os dependant. have a look at fgetc(stdin); Hoping to get certified..in C programming.
With this part of the code
code=scanf("%c",code);
the compiler first of all scans (reads) the choice into code, which in this case is wrong syntax anyway - you forgot the ampersand &, then you reassign code a different value by having code equal to the return value of scanf, which...
itoa(num, string, 10);
where the last parameter is always "10" if you are using the base-10 (normal) number system. Hoping to get certified..in C programming.
...are declaring variables in different lines in your code other than at the start. This is C not C++. In C you have to declare your XYZ xyz; and FILE *fp1; at the start before process begins.
this was found without looking for other faults if there are any. Hoping to get certified..in C...
...write character to third string using and incrementing the counter.
After final iteration of outer loop add null character to third string.
for(*sptr1 = string1; *sptr1, sptr1++)
{
for(*sptr2 = string2; *sptr2, sptr2++)
{
if(*sptr1 == *sptr2)
{
flag = 1...
...then loop through each line of text and increment the counter like so
int counter = 0;
char str[line_length]; // string of required length
FILE *fp;
fp = fopen(filename, "rt");
while(fscanf(fp,"%[^\n]\n", str)!=EOF)
counter++;
printf("File holds %d lines of...
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.