Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~648 People Reached
Favorite Forums
Favorite Tags
c x 9
Member Avatar for illuminatus89

[CODE]#include<stdio.h> #define UN_IN -1 #define COL 10001 #define ROW 5000 int main() { int r,c; long int a[ROW][COL]; for (r=0;r<ROW;r++) for(c=0;c<COL;c++) { a[r][c]=UN_IN; // b[r][c]=UN_IN; } printf("%d %d", a[34][56],a[12][67]); getch(); return 0; } [/CODE] I was solving a problem which required large input. Am using a two dimension array but …

Member Avatar for Narue
0
107
Member Avatar for illuminatus89

[CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> struct a{ char *c; int b; }t; int main() { scanf("%s %d",t.c,&t.b); printf("%s",t.c); getch(); return 0 ; }[/CODE] I guess there is some problem in receiving input (more precisely in t.c part). Further assistance will be appreciated.

Member Avatar for illuminatus89
0
134
Member Avatar for illuminatus89

[CODE]#include<stdio.h> #define ARSIZE 1000000 int main() { int i=0,j=0,c=0,k,n; int prep[ARSIZE]; for(i=0;i<1000000;i++) { j++; for(k=2;k<j;k++) { if(j%k==0) c++; } if(c==2) prep[i]=j; c=0; } printf("Enter N : "); scanf("%d\n",&n); printf("%d",prep[n-1]); getch(); return 0; } [/CODE] why is this code giving segmentation fault??

Member Avatar for vikashj
0
73
Member Avatar for illuminatus89

Is there any way by which I can initialize all the elements of an array(already declared) in one statement?? That is, without using loops

Member Avatar for benwilliams
0
236
Member Avatar for illuminatus89

Through my knowledge, I know that by declaring a variable as 'const', its stored in read only memory and at the same time I found that a const variable's value can be changed using pointers. How is it possible?

Member Avatar for manojwali
0
98