Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
1 Commented Post
0 Endorsements
Ranked #12.3K
Ranked #3K
~8K People Reached
Favorite Forums
Favorite Tags
Member Avatar for pittdaniweb

Hello everybody, I was asked by an interviewer the following question. but I was not able to answer. Please get back to me if you know the answer. thank you in advance. Que: What is the exact difference between the "for" loop and "while" loop in C language ?

Member Avatar for rajii93
0
794
Member Avatar for vinodhsml

[CODE]#include<stdio.h> #include<conio.h> //header file declaring void main() { int a,i; clrscr(); printf("\n Enter the Number:"); //get value scanf("%d",&a); if(a%2==0) { printf("\n Not prime number"); } else { for(i=3; i<a; i=i+2) { if(a%i==0) { printf("\n Not a prime"); break; } } printf("\n Prime number"); } getch(); } [/CODE]

Member Avatar for reojavier
-1
129
Member Avatar for bckc

Hi guys, I started learning C a few days ago, watching as many youtube tutorials as possible but there aren't many tuts on youtube :/ Can anyone recomend me a good book or list of tutorials? I started to read "The C Programming Language" by dennis ritchie but It's a …

Member Avatar for cse.avinash
0
172
Member Avatar for chezkaty

can you please help me again to this?:( cause the previous one I've asked to you i didn't get it :(( write a program that determines whether a given positive integer is an armstrong number. -----armstrong number is an n-digit number that is equal to the sum of the nTH …

Member Avatar for Anirudh Rb
0
114
Member Avatar for Master Mascus

The random function, generates the same values each the time program is run.. Any other function to output random numbers, each time the program is run ??

Member Avatar for Narue
0
154
Member Avatar for lastbencher

This code is not running. i'm using gcc [code=c] #include<stdio.h> int main() { struct book { char name[10]; float price; int pages; }; struct book b[5]; int i; for (i=0; i<5; i++) { printf("Enter name, price and pages\n"); scanf("%c %f %d", &b[i].name, &b[i].price, &b[i].pages); } for (i=0; i<5; i++) printf("%c …

Member Avatar for lastbencher
0
121
Member Avatar for mail2shrid

If i'm scanning from keyboard using getch(), how do i check which arrow key has the user pressed??(Arrow keys have ASCII values same as some other keys so we can't directly check for ASCII values)

Member Avatar for ashok1514
0
4K
Member Avatar for fullarmorzz

[CODE]#include<stdio.h> #include<conio.h> main() { char c; printf("Enter the code for the chart: \n"); do { scanf("%c",&c); switch (c) { case 'A':printf("Area Chart\n");break; case 'B':printf("Bar Chart\n");break; case 'U':printf("Bubble Chart\n");break; case 'C':printf("Column Chart\n");break; case 'N':printf("Cone Chart\n");break; case 'Y':printf("Cylinder Chart\n");break; case 'D':printf("Doughnut Chart\n");break; case 'L':printf("Line Chart\n");break; case 'I':printf("Pie Chart\n");break; case 'P':printf("Pyramid Chart\n");break; case …

Member Avatar for ashok1514
0
128
Member Avatar for braindope

guys pls help me to creat a progam using array that will display the ff sequence 1,1,2,3,5,8,13,21,3,55 after displaying the fibonacci series tha program will ask for an array psition & will display its corresponding value this is done continnously... please...

Member Avatar for ashok1514
0
117
Member Avatar for fullarmorzz

[CODE] #include<stdio.h> #include<conio.h> main() { char c; printf("Enter the code for the chart: \n"); do { scanf("%c",&c); switch (c) { case 'A':printf("Area Chart\n");break; case 'B':printf("Bar Chart\n");break; case 'U':printf("Bubble Chart\n");break; case 'C':printf("Column Chart\n");break; case 'N':printf("Cone Chart\n");break; case 'Y':printf("Cylinder Chart\n");break; case 'D':printf("Doughnut Chart\n");break; case 'L':printf("Line Chart\n");break; case 'I':printf("Pie Chart\n");break; case 'P':printf("Pyramid Chart\n");break; …

Member Avatar for ashok1514
0
147
Member Avatar for fullarmorzz

We are asked to input 10 integers where in we need to display: 1. The sum of all the odd numbers 2. The sum of all the even numbers I do not know how to make a statement and i do not know whether to use for or while and …

Member Avatar for ashok1514
0
189
Member Avatar for resell4
Member Avatar for hackit

i found a very simple program that is very simple but have a great logic. [CODE] #include<stdio.h> #include<conio.h> void main() { int B=1; printf("%d\n%d\n%d",b=15,b>9,b<9); getch(); } [/CODE] this seems very simple to me but the output is very strange to me OUTPUT:- 15 0 1 I tried very much to …

Member Avatar for Narue
0
150
Member Avatar for D.M.
Member Avatar for ashok1514
0
641
Member Avatar for susees

[CODE]#include<stdio.h> #include<conio.h> #include<string.h> #include<ctype.h> int main() { char org[50],r[50],m[50],a; int i,j,c=0,length=0,h=0,g=0,z; char token [3] [20] = { "void", "main", "int"}; printf("\nenter a line:"); gets(org); for(i=0;org[i]!='\0';i++) { length++; } for(h=0;h<3;h++) { for(g=0;g<length;g++) { z=strcmp(org[g],token [h]); if(z==0) printf("Keyword:%s\n\n",m); else printf("NO_Keyword:%s\n\n",m); } } printf("\n"); system("pause"); return 0; }[/CODE] it is showin this warning....[Warning] …

Member Avatar for raptr_dflo
0
1K
Member Avatar for kylelendo

I have problem in this c program [CODE] #include <stdio.h> int main() { int this_is_a_number; printf( "Please enter a number: " ); scanf( "%d", &this_is_a_number ); printf( "You entered %d", this_is_a_number ); getchar(); return 0; }[/CODE] when i press ctrl+F9 the output screen appears " Please enter a number:" and …

Member Avatar for Narue
-1
226