- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 20
- Posts with Upvotes
- 18
- Upvoting Members
- 9
- Downvotes Received
- 6
- Posts with Downvotes
- 6
- Downvoting Members
- 3
hello...m avinash..pursuing my degree in Computer Science and engineering from durgapur,West Bengal,India.I am happy to be a part of daniweb, provides me a good platform to learn and help others.
thanks to daniweb
- Interests
- apart from programing,i play flute & harmonium, i ve als interest in sketching.
- PC Specs
- C and C++. I want to learn them in very depth, but programming is not C/C++/JAVA, it is logic and algo.
Hi all, I have already used InitGraph and have given the path(C:\\TC\BGI) in Initgraph and checked the Graphics option in Linker Options. Still Iam getting this error. I want a solution. Can somebody pls help me. Its urgent. |
|
Here is the code for [B][COLOR="Red"]Insertion Sort, Bubble Sort and Selection Sort[/COLOR][/B] [B]Insertion Sort[/B] [CODE] #include <stdio.h> main() { int i,j,key; int a[5]={5,2,3,4,1}; for(i=1;i<5;i++) { key=a[i]; while(i>0 && a[i-1]>key) { j=a[i]; a[i]=a[i-1]; a[i-1]=j; --i; } } int k; for(k=0;k<5;k++) {printf("%d ", a[k]);} printf("\n"); } [/CODE] [B]Bubble Sort[/B] [CODE] #include <stdio.h> … |
|
Hello all, I am implementing linked list programs in C. And for that i want to know more about Self Referential Structure in C. If anyone knows more detail information about it then please tell me. I am having one example here which helps you to understand more clearly what … |
|
Hello every one Can I have a better algorithm to find the nth prime number, where 1<= n <=5000000. for e.g., 1st prime number is 2. 10th prime number is 29. 100th prime number is 541. 1000th prime number is 7919. 10000th prime number is 104729. 100000th prime number is … |
|
What are the advantages of Macros over External(Global) variables? |
|
I am doing following code to get the output upto 5 decimal characters of any number inputted by user when divided by 1, I have to use typecast it with (float) , can any one tell me how this can be done without typecasting or using float constant.. int main() … |
|
I want to fetch names and address of all my friends from facebook and store it in my system, Can AnyOne tell me how this can be done with html, php or anything...I don't have any idea for this.. |
|
I am a newbie to php and learning now, can you please help me telling how can I take inputs from users in pHp instead of using forms (i.e., a replacement of scanf() in php. I am solving a question to take number as a input and print that number … |
|
I ve to sort an array according to finish time and accordingly start time should be arranged, how can we do this using predefined function qsort. Both Start time and finish time, i ve considered it be in a structure , .here is the code.. #include<stdio.h> #include<stdlib.h> int compare (const … |
|
can an1 plz :)help me to write a program to reverse the individual words present in a string ?? exampe:- my name is raju ym eman si ujar |
|
hello im new in programming and i need help in printing this kind of output [CODE] * * * * * * * * * *[/CODE] the number of iterations depends on users input please help me |
|
why do my programs just flash off the screen when i try to execute them? i am new to programming, don't forget! |
|
[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] |
|
i have to find proper divisors of a positive integer.for instance,the proper divisor of 15 are 1,3,5. input 15 output 1 3 5 like that. Thank you for your helps. |
|
Hello everyone I am trying to apply [URL="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes"]Sieve of Eratosthenes[/URL] in program, but its not working. Here is my code:-- [CODE] #include<stdio.h> long long arr[10000]={0}; int main() { long long i,j,num,inc=2,m=0; num=5000; for(i=0;i<num;i++)arr[i]=i; for(i=2;i<=num/2;i++){ if(arr[i]>0) { for(j=inc*i;arr[j]<=num;j=j+i) arr[j]=-1; inc++; } } for(i=0;i<num;i++)printf("%lld ",arr[i]); printf("\n"); return 0; } [/CODE] This code … |
|
i hv 2 write a code for queue fifo rule for patients visiting doctor's clinic.. can any1 atleast tel me the algo? i'll implement it by myself... |
|
Came across this showbits() function in the book im using to learn C. None of the compilers recognize it. The actual code for the function is given in the book as well. I tried to combine the two by putting function's code in header file. I have been unsucessful so … |
|
I wrote this program for insertion sort.I compiled the source file in xubuntu terminal.But when I try to run a.out executable....terminal showing "segmentation fault".I don't about segmentation fault..when segmentation fault occurs...what is the thing in the source file that is causing segmentation fault... Thanks in advance...... [CODE]#include<stdio.h> main(){ int i,j,n,key; … |
|
hello daniweb.. :) I am learning JAVA and currently new to it, I am studying "The Complete Reference-JAVA" by Herbert Schildt. In that book its written that using short or byte will save space, but there is no guarentee that Java won't promote those types into int internal anyway. Remember … |
|
HI how can store multiple array into one array [CODE] int id[5] = { 1,2,3,4,5,6}; int size[5] = {35,76,85,78}; int PerBox[5] = {12,24,44,54}; double Price[5] = {3.32,6.76, 13.45,6.08,7.8}; int item[200],i; for(i=0;i<4;i++) { item[i] = {id, size, PerBox, Price}; } [/CODE] each element should store id, size, perbox, price and output: … |
|
I am supposed to read a text file containing "lyrics", then format it out based on special symbols like +,-,[] and spaces. Here's the lyrics syntax: [B]Spaces are significant:[/B] A single space between two words makes the two words go in two successive beats. Each additional space causes the lyric … |
|
Can someone help me in building a syntax for this problem Write a program that accepts a positive integer and gives its prime factorization that expresses the integer as a product of primes. Here's one that I did: [CODE] #include<stdio.h> #include<conio.h> void main() int N,R; clrscr(); printf("Please enter a no.:\n"); … |
|
[CODE]#include<stdio.h> int main() { int n,i,c=0; printf("\nEnter a no:"); scanf("%d",&n); for(i=1;i<n;i++) { if(n%i==0) { c=c+i; } } if(n==c) printf("\nPerfect no."); else printf("\nNot a perfect no."); }[/CODE] |
|
Hi frnz , i need a code for 2^n and suppose user enter n = 4 , so the output will be 16 . Now whatever output we will get i need sum of numbers in that output e.g here we have 16 i.e 1 + 6 = 7 . … |
|
why we need to avoid using scanf to read a character???? can anyone explain it clearly?? |
|
explain the output:-- [CODE] int main(void) { int a=10,b; a=a+b-(b=a); printf("%d",a); } [/CODE] I am not understanding it. the precedence of bracket() is greater so b is assigned to a so expression becomes- a=a+a-a which should be equal to a but it is not why? |
|
[B]i have written one programm in c using structure to enter name and account number of the emplpyee.the programm shows an error which is filename.c:11 error:expected identifier or "("before"["token..i am not able to get the error...please clearify it.[/B][CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> main() { struct wipro { char name[20]; char accnum[10]; … |
|
This is for a CS course I am taking. I'm stuck. I need to write a program that takes a number and tallies up how many cycles it takes of multiplying the digits until it is a single digit number. ie: 715 = 7 * 1 * 5 = 35 … |
|
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 … |
|
[CODE] #include<stdio.h> #include<conio.h> #include<malloc.h> int main() { int i=0,j=0,n=0; char *a,**b; a=(char *)malloc(sizeof(char)*50); printf("Enter your text\n"); gets(a); while(a[i]!='\0') { *(b+n)=(char *)malloc(sizeof(char)*20); //error for(j=0;a[i]!=' ';i++,j++) { *(*(b+n)+j)=*(a+i); } i++; n++; } printf("Words in given text are \n"); for(i=0;i<n;i++) { puts(*(b+i)); printf("\n"); } printf("Possibile combinations are \n\n"); for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(j!=i) … |