Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Google Pixel 9 Pro
vgp
Updated:
Thursday at 5:57 PM
Ad icon
Jobreceive.com for sale
Blogerwiki
Updated:
Tuesday at 8:55 PM
Post Your Vehicle for Sale — FREE! - https://libro.lk
Kalu_Puth
Updated:
Tuesday at 7:38 PM
ඔයාගෙ Assignment හෝ Thesis එක හරියට හදාගමු
ErMurazor
Updated:
Sep 26, 2026
Ad icon
BlackWall V2ray servers
hu KANNA
Updated:
Sep 23, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
C programmers help me-Simple program...
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="senewimala1988" data-source="post: 4158627" data-attributes="member: 63023"><p>Meka thama question eka mata mekata coding tika kiyanavada..Simple program 1k..arrays & loops use karanna oni...</p><p></p><p><span style="color: Black">Suppose there are 4 students each having marks of 3 subjects. Write a program to read the marks from the keyboard and calculate and display the total marks of each students. Use a 2-D array to store marks. An example would be as follows.</span></p><p><span style="color: Black"></span></p><p><span style="color: Black">Enter the marks of four students, on four rows:</span></p><p><span style="color: Black">50 60 80</span></p><p><span style="color: Black">60 75 90</span></p><p><span style="color: Black">30 49 99</span></p><p><span style="color: Black">66 58 67</span></p><p><span style="color: Black"></span></p><p><span style="color: Black">Total marks of four students:</span></p><p><span style="color: Black">190</span></p><p><span style="color: Black">225</span></p><p><span style="color: Black">178</span></p><p><span style="color: Black">191</span></p><p></p><p>Meka thama mage program eka...Eth segmentation fault kiyala enava...I am new for C programming...Help me...</p><p></p><p><span style="color: Black">#include<stdio.h></span></p><p><span style="color: Black">int main()</span></p><p><span style="color: Black">{</span></p><p><span style="color: Black">int i,j;</span></p><p><span style="color: Black">int tot<em>;</em></span></p><p><span style="color: Black"><em>int a[4][3];</em></span></p><p><span style="color: Black"><em>printf("Enter marks of four students, on four rows: \n");</em></span></p><p><span style="color: Black"><em>for(i=0;i<4;i++);</em></span></p><p><span style="color: Black"><em>{</em></span></p><p><span style="color: Black"><em>tot<em>=0;</em></em></span></p><p><span style="color: Black"><em><em> for(j=0;i<3;j++)</em></em></span></p><p><span style="color: Black"><em><em> {</em></em></span></p><p><span style="color: Black"><em><em> scanf("%d",&a<em>[j]);</em></em></em></span></p><p><span style="color: Black"><em><em><em> tot<em>+=a<em>[j];</em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em> }</em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em>}</em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em>printf("Total marks of four students: \n");</em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em>for(i=0;i<4;i++)</em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em>{</em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em>printf("%d\n",tot<em>);</em></em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em><em>}</em></em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em><em>return 0;</em></em></em></em></em></em></span></p><p><span style="color: Black"><em><em><em><em><em><em>}</em></em></em></em></em></em></span></p></blockquote><p></p>
[QUOTE="senewimala1988, post: 4158627, member: 63023"] Meka thama question eka mata mekata coding tika kiyanavada..Simple program 1k..arrays & loops use karanna oni... [COLOR=Black]Suppose there are 4 students each having marks of 3 subjects. Write a program to read the marks from the keyboard and calculate and display the total marks of each students. Use a 2-D array to store marks. An example would be as follows. Enter the marks of four students, on four rows: 50 60 80 60 75 90 30 49 99 66 58 67 Total marks of four students: 190 225 178 191[/COLOR] Meka thama mage program eka...Eth segmentation fault kiyala enava...I am new for C programming...Help me... [COLOR=Black]#include<stdio.h> int main() { int i,j; int tot[i]; int a[4][3]; printf("Enter marks of four students, on four rows: \n"); for(i=0;i<4;i++); { tot[i]=0; for(j=0;i<3;j++) { scanf("%d",&a[i][j]); tot[i]+=a[i][j]; } } printf("Total marks of four students: \n"); for(i=0;i<4;i++) { printf("%d\n",tot[i]); } return 0; }[/i][/i][/i][/i][/i][/i][/COLOR][i][i][i][i][i][i][/i][/i][/i][/i][/i][/i] [/QUOTE]
Insert quotes…
Verification
Awruddata maasa keeyada?
Post reply
Top
Bottom