Search Results

Search: Posts Made By: dare
Forum: Programming 06-27-2013
15,723
Posted By dare
I tried the code without using fseek but same...
I tried the code without using fseek but same thing happens.....as I am still in a nascent stage of learning, I am unable to ascertain the usefulness of strace....any help would be great.
Forum: Programming 06-25-2013
15,723
Posted By dare
The problem is that the second loop does not even...
The problem is that the second loop does not even open the file fp for reading. I have checked it by doing the following:

for(z=0;z<2;++z)

{
...
Forum: Programming 06-23-2013
15,723
Posted By dare
#include<stdio.h> #include<stdlib.h> ...
#include<stdio.h>
#include<stdlib.h>
#include<time.h>

int random_no(int);
void calc_file_row_col(FILE *,int *,int *);

int main()
{
int i,j,z;
int temp=0;
int row,column;
...
Forum: Programming 06-23-2013
15,723
Posted By dare
*** glibc detected *** ./a.out malloc() memory corruption
I am facing a problem of memory corruption. The loop runs for the first time but does not go through the second time. What could be the problem?


for(int z=0;z<2;z++)
{...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy