15,551 Topics

Member Avatar for
Member Avatar for falakistan

hello everyone, i an new in daniweb and i want to know that how to generate random numbers in c without using pre-defined functions........... i can not use any predifined function...........it should b totaly our logic to generate random numbers........... please help me out........... i dont know c.........although i know …

Member Avatar for Narue
0
45
Member Avatar for rohtash
Member Avatar for Ich bin würdig
0
100
Member Avatar for theju112

[CODE] #include<stdio.h> #include<stdlib.h> typedef struct a { int data; struct a* next; }node; void addatbeg(); void delete(); void display(); node *first=NULL; int main() { int ch; while(1) { printf("\n1:to add elements \n2:to delete elements\n 3:to display elements"); scanf("%d",&ch); switch(ch) { case 1:addatbeg(); break; case 2:delete(); break; case 3:display(); break; default:printf("\n …

Member Avatar for theju112
0
389
Member Avatar for minimi

It compiles and run but I'm stuck on the last part - I can't figure out how to iterate through the LinkedList and delete all students whose birthYear is greater than 1995 (print only students whose birthYear is less than 1995). I have to iterate after inserting all records into …

Member Avatar for Narue
0
174
Member Avatar for Leaningnew

fscanf returns EOF in case of [U]errors[/U] or if it reaches eof. what does error mean in this context ...which type of errors are encountered???

Member Avatar for nezachem
0
75
Member Avatar for ayeshashahid

[CODE]//SOME BODY PLEASE WRITE THIS IN C++ LANGUAGE// //THANK YOU// # include<stdio.h> # include<conio.h> /*program to evaluate the given postfix expression*/ typedef struct { int a[100]; int top; } STACK; void push(STACK *s,int x) { if(s->top==99) printf("STACK OVERFLOW\n"); else s->a[++s->top]=x; } int pop(STACK *s) { int x; if(s->top<0) printf("STACK UNDERFLOW\n"); …

Member Avatar for ayeshashahid
0
193
Member Avatar for Neo_cse
Member Avatar for Narue
0
144
Member Avatar for johnhuge

hello, i have tired to sort my link list but unfortunately i can't seem to get it working. The problem i having with the sort function is that it will sort the function when i enter a member to the list at the end except for the head. Also when …

Member Avatar for johnhuge
0
123
Member Avatar for ankur3000

Hey guys, I need some help regarding a project involving dictionary based language translation. So what I have to do is, given a text in a foreign language (like Hindi), my program should match each word from a 'dictionary like file' and give the output in English, I don't have …

Member Avatar for sergent
0
179
Member Avatar for monty486

Hi there i have a txt file containing these variables anil just_go_with_it 5 betty the_dark_knight 3 anil source_code 3 carrie just_go_with_it -3 anil paranormal_activity -5 doug the_dark_knight 5 betty shawshank_redemption 5 carrie source_code 1 betty paranormal_activity 5 carrie shawshank_redemption 5 doug shawshank_redemption 3 what im trying to do is to …

Member Avatar for monty486
0
86
Member Avatar for Jfunch

The problem I need to solve is Write a program using fork() to compute average of N numbers. The parent process forks a child process that takes input from the user, adds all the numbers and returns the sum and the count of numbers to the parent process that divides …

0
73
Member Avatar for tahir696

Make a program which takes in a whole number in the range 0 – 2147483647 and output the binary bit pattern for each of the following case: 1. 32 bits: if the input number is stored as int. 2. 32 bits: if the input number is stored as float. 3. …

Member Avatar for gerard4143
0
146
Member Avatar for linux

Running: Windows 7 Home Premium. I am not sure if I am posting this in the correct board, so please move this if I am incorrect in my post placement. I am trying to set Allegro up, for programming a 2D game in C (which is why I chose this …

Member Avatar for linux
0
505
Member Avatar for Leaningnew

actually in gcc compiler of linux everything is working fine without header files... Then what is the real use of the header files in c & c++ langs ?? can anyone ans it??

Member Avatar for gusano79
0
172
Member Avatar for swissknife007

[CODE] #include<stdio.h> #include<conio.h> void hello() { printf("\nHELLO\n"); } int main() { hello(); hello(); hello(); hello(); getch(); return 0; } [/CODE] If I run this code on a compiler,how many processes and how many threads will be running on the compiler and which ones? Does a duplicate function call consist another …

Member Avatar for gerard4143
0
184
Member Avatar for dev90

In structure hen i read floating point value from user and i get the error like"floating point not conneted..." i have been sugested to write two lines for that extern void float conetor(); #pragma extref floatconnector even though i got the same error it is not even asking for float …

Member Avatar for Narue
0
153
Member Avatar for fullarmorzz

please help me. my program is working but not displaying the table but i followed the syntax for the two-dimensional array. how come the program does not display the table? here is the code. :D [CODE] #include<stdio.h> #include<conio.h> main() { int x[5][5],a,j; for (a=0;a<=5;a++) for (j=0;j<5;j++) x[a][j]=(a*4)+j+1; for (a=0;a<=5;a++) for …

Member Avatar for fullarmorzz
0
90
Member Avatar for spongernz

Hi, I have a bunch of hex constants I'd like to define with new names for characters for an LCD driver I'm writing. Can I just define them in hex in the header like this: #define NINE 0x39 Do I have to force #define statements into char like this? #define …

Member Avatar for WaltP
0
117
Member Avatar for Jfunch

The problem I am trying to solve is Write a program using fork() to compute average of N numbers. The parent process forks a child process that takes input from the user, adds all the numbers and returns the sum and the count of numbers to the parent process that …

0
62
Member Avatar for DmytriE

Hello everybody, I have never done anything with dynamic memory allocation and was trying to allocate enough memory to hold four elements of an array. Each of these elements will hold another array that will hold the actual data. My questions is how can I check the size of a …

Member Avatar for DmytriE
0
116
Member Avatar for Leaningnew

how does the size of int ,float ,pointer varies according to 32 and 64 bit processors? can anyone explain it clearly?

Member Avatar for sergent
0
183
Member Avatar for Master Mascus

[CODE]printf("\n How much you tickets you want to bet(Rs20 per ticket): "); scanf("%i",&bet); int x=0; for (x=0;x<bet;x++) { printf("\n Enter the 6 numbers ( 1 - 40): "); // int num/*concatenate x */[100] for( i=0;i<6;i++) scanf("%d",&num/*concatenate x */[i]); // Storing the values inserted into array num }[/CODE] Suppose i got …

Member Avatar for Master Mascus
0
137
Member Avatar for Azmah

I'm looking for some projects to follow and learn in C; it really helps in developing my skill. Thanks in advance.

Member Avatar for Azmah
0
165
Member Avatar for manaila

Hi, I have a working C source code for implementing writing of alphanumeric characters from a 3x4 keypad, similar to a normal cell phone 3x4 keypad. However, when I want to store the characters that have been typed from the keypad as a string, the characters that are on the …

Member Avatar for kings_mitra
0
190
Member Avatar for abylus187

I think something is wrong with my Flames project.. please help me the wrong might have been the counting.. example Rizal maria I crossed out the similar letter and it came out that it had only three letters that are not similar so in F L A M E S …

Member Avatar for kings_mitra
0
140
Member Avatar for theCompiler

[CODE]#include.. int x,y,x1,x2,y1,y2; int midpoint (int x, int y) { x=2(x1+x2); y=2(y1+y2); } void main() { clrscr(); printf("enter 4 points"); scanf("%d %d %d %d",&x1,&x2,&y1,&y2); midpoint(x,y); printf("the midpoint is %d %d",x,y); getch(); } [/CODE] i cant run my program i think there's a problem in the function midpoint but i cant …

Member Avatar for MonsieurPointer
0
109
Member Avatar for neeraj goswami

[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]; …

Member Avatar for neeraj goswami
0
282
Member Avatar for zzou

hi The question to which am using the for loop is as follows: Write a C interactive program that will encode a word or sentence entered by a user. The encryption will be done as follows: For any word or sentence (note: blank spaces, special characters are ignored here, i.e …

Member Avatar for kings_mitra
0
138
Member Avatar for theCompiler

im creating a cartesian plane i will plot the points but how am i supposed to determine if the points create a single straight line ? tnx

Member Avatar for kings_mitra
0
319
Member Avatar for bobytch

Good Day Everyone here is my code so far [CODE] #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> void vp(int x,int tc,int bk,char *text); void square(int x,int y,int size); void main() {//=========================================================== int gdriver = DETECT, gmode, errorcode; initgraph(&gdriver, &gmode, "C:\\TC\\BGI"); //------------------monitor-------------------- setbkcolor(0); setcolor(15); square(300,160,150); square(300,160,148); square(300,160,130); square(300,160,131); setaspectratio(2,5); int …

Member Avatar for vidit_X
0
281

The End.