Thanks very much all this is clear now :)
Type: Posts; User: ssharish
Thanks very much all this is clear now :)
Many thanks laserlight. Could you please elaborate on this? What do you mean by "consecutive sequence points". How does it make it undefined when the same object being modified. Surely i can update...
Hi all.
It been a really long time ive spent time on this board and ive moved on from C and im trying to get back into it. However my memory had been very rusty.
Could someone please help...
The first mistake which you have here is using feof function and i cant really see anywhere that you are trying to read something from a file. If you are trying to read from a file you need to open a...
thax very much for correcting me guys :)
well, the intention of this statment is to find the length of the string
for(;string[len]!='\0';len++);
find the length of the string and allocate memory for the ret. what do u all thing...
s.s.harish managed to post both a buffer overflow and a memory leak at the same time - classic.
i am veryy sorry for the wrong post salem. can u please tell me where i have gone wrong
s.s.harish
this is what i do
#include <stdio.h>
char* rot13(char*);
int main()
{
read FAQ to find more about this code
int ch;
.
.
while((ch=getchar()!='\n' && ch!=EOF)
.
.
well, it seems to work fine for me, and i am using Dev-c++ compiler. i have made some changes as well
#include<stdio.h>
#include<stdlib.h>
int main()
{
int **A, **B, **C, row1, row2,...
Originally posted by dudinka
hey guys, could someone help me with the output of this program:
#include <stdio.h>
#define newline {putchar(’\n’);}
use this code to clear the input buffer
while((ch=getchar())!='\n' && ch!=EOF);
printf("\nIntroduzca el nombre de la persona: ");
scanf("%s", &gente[b].nombre);
Originally Posted by pass_prime
/* Assignment 4 - Bonus
Variables: int MaxCoins, NumCoin,
float CurrentAmt,AmtRemaining
*/
well, the code dosen't even compile, u have made lots of syntax error, check out these
1. make sure all the key words starts with low case letters
2. have all the variables declared
3. check...
well, if you want to read the data and just print it on screen why dont u do this
#include<stdio.h>
int main()
{
FILE *fp;
char str[80];
try out this code
int rock()
{
int compchoicerock;
srand(time(0));
compchoicerock = rand() % 3;
well, it looks like the string is fully filled with NULL. consider the following programe
#include<stdio.h>
int main()
{
char foo[5]={'\0'};
int i;
and here is one more example
#include<stdio.h>
struct student
{
char name[20];
int age;
};
this is an example of how to use the sscanf(), here is sample code
#include<stdio.h>
int main()
{
char str[20]={"hello world 2005"};
char str1[10];
int year;
the syntax for fputc function is
fputc(int, FILE *);
so your code will be as follow ( and i have made some changes to make your program work fine)
while (string[i]!= '_' && string[i]!= (char)EOF);
what is this?. if u are looking for a '\' then this is not the proper statment to check
while(string[i]!='\' . . . . . )
try out this bit of code which migght help u
#include<stdio.h>
char * change()
{
static char array[10]={"hello"};
return array;
}
thax Jez my typing mistake
s.s.harish
printf("%d + %d",1,2);
s.s.harish
thax very much i got it now
s.s.ahrish