15,551 Topics
| |
**With a 2^32 address space and 4K ( 2^12 ) page sizes, this leave 2^20 entries in the page table. At 4 bytes per entry, this amounts to a 4 MB page table, which is too large to reasonably keep in contiguous memory. ( And to swap in and out … | |
why this code not work ?? # include <stdio.h> void get_values(float *r, float *v); float do_calculations(float resistance, float voltage ) ; void display_answer(float current); main() { float resistor; float volts; float current; //explain_program(); get_values(*r, *v); current = do_calculations(resistor, volts); display_answer(current); } void explain_program() { printf("This program calculates the current in … | |
I am using Visual Studio 2013 and can't install any libraries(for school purposes)... I would like to display an image of any extension as long as it is an image (jpg/png/bmp...) I've been looking around forever now and just want to put display an image in my application. I am … | |
I am new in c programing.In apps they usualy have images as background take for example a question and answer app will have a colourful backgroung.If i draw an image with corel draw how can i display as background in my c program. | |
is there any alternative for wavread (in matlab) in c. i want to get the samples, sampling frequency and bits per sample??? | |
hello, I'm new to c and i need to put the following string from a file into a linked list : music;artist;1,2,3,4;2015 i also need to put "1,2,3,4" in an array but only the numbers. I would really appreciate your help. Thank you | |
In the following program it says that there is a conflict between my getline and the getline in stdio.h. I understand what it's saying because stdio.h has it's own getline function. What's confusing me is that this is the program that my programming book (The C Programming Language) is giving … | |
| //compiled with cmd command:gcc main.c -std=c11 -o main.exe //this is only file #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <string.h> //user changeable variables int boardSize = 9;//board hight and width are of equal size #define NUMBER_OF_GRID_CHOICES 7//this has to be an odd number(increase it by two if you add another … |
it is a simple program but the beuty lies in its shortness it is written in least line as possible By :- Anurag Pareek | |
i have programe in c but i need to use function and i have no idea how do it can any one help me please and one more thing i cant use loop inside case so it must be out #include<stdio.h> #include<stdlib.h> int main() { int row ,n,c,temp,k,count=1; int input … | |
Hi All, I am very new to C Programming. I am writing a C Program to run in an UNIX machine which is used to Archive Log files if it exceeds a particular Size. The thing is the program has to get the details of the file like file name, … | |
hii I have a list having m1 m2 m3........ m922 and in each there are a1 a2 a3 a4 are there like m1=a1 a2 a3 a4 a5 a6 m2=a1 a2 a3 a4 a5 a6 m3=a1 a3 a5 a7 a8 a2 etc and i want this as m1=a1 a2 a3 a4 … | |
Hello, I posted on this forum two times before about a particular pair of non-printing characters being inserted into my code. You can find the threads [here](https://www.daniweb.com/software-development/threads/441611/stray-non-printing-characters-in-my-programs) and [here](https://www.daniweb.com/software-development/cpp/threads/450296/arbitrarily-appearing-non-printing-character). Two great posters tried their best to solve this problem (mike_2000_17 and deceptikon) to no avail. Finally, using the hints that … | |
I want to get the occurence of the symbol ';' for each line of this C program. I type the name of the file Source.c and try to count the occuring symbol, but i am getting the value for ALL of the ';' for each line. #include <stdio.h> #include <stdlib.h> … | |
Hi, This two parts of code both are intended to do one thing. get two numbers from user, calculate sum between them. print it. now only the first code is working properly. second one is faulty. but why? what's the problem? code no1: #include <stdio.h> int main() { int n, … | |
In my opinion, that code is not true. because of in the 15 line. I assume that, when a==i --> a%i==0 --> break; --> line 16 will be never executed! please make me clearly ! | |
Sample output: Please enter a number(Less than 8 digits): 1203021 how can I sure only 8 digits key in and how to count the zero inside the given number. Please teach me final is coming :( | |
Hi, I wrote the following program: #include <stdio.h> #include <stdlib.h> #define TRUE = 1; #define FALSE = 0; static int *arr; static int size=0; void createSet() { arr= (int *)malloc(sizeof(int)); size=0; }/*createSet function*/ void putInSet(int num) { int *temp; size++; temp=(int *)realloc(arr,size*sizeof(int)); if(temp!=NULL) { arr=temp; } else { printf("Insufficient amount … | |
please help!!!!! I wrote this program to calculate addtition and subtraction of two large numbers (maximum 100 digit) it won't work for minus numbers :( i know it have problems but i couldn't fix them,please help me for fixing this :) #include <stdio.h> #include <stdlib.h> int main() { int i,d=0,la,lb,max,ia,ib,ix,iy; … | |
Hello friends, I am trying to work on a project that dynamically allocates memory when needed for a string array. I just keep getting memory faults when reallocating memory but can't find any thourough tutorials on realloc besides the man page. So basically, I malloc 201 character spaces in an … | |
hey , i'm having a problem with a LINK error i keep getting the same error although deleted the line with the flushall_ also i copyed the code in a new project but it still gives me the same error the error : Error 1 error LNK2019: unresolved external symbol … | |
This program goes against everything I have been taught and learned in C. How does this compile? Why does this not need to be int main? Why no return 0? Don't you need an initial declaration of sub() above main? That bugs the crap out of me. I like keeping … | |
Hi. am starting out with network programming and unix network programming book. all its trying to do is connect to server and read time, but when i run it it says : 'connect error: Connection refused' Here's the code : #include "unp.h" int main(int argc, char **argv) { int sockfd, … | |
Hello, Can someone, please, comment on the following curious fact that I encountered in C (actually, I use gcc, which has the default language Gnu C): If one writes const int a=10; const int b=a; one gets an error indication at the declaration of b (not constant!). I would be … | |
[CODE]//--------------------------------------------------------------------------- #include <windows.h> #include <CommCtrl.h> // needed for adding custom toolbar #include "resource.h" #pragma hdrstop //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- LPCTSTR ClsName = L"FundApp"; //LPCTSTR WndName = L"Resources Fundamentals"; const int NUMBUTTONS = 3; TCHAR AppCaption[40]; LRESULT CALLBACK WndProcedure(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //--------------------------------------------------------------------------- INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, … | |
**Construct a binary tree using the following pre - order and in - order trasversals : Pre-order:ABGHMCDEF In-order:BHMGADFEC ** I Just Need a Diagram of Binary Tree . I have tried a lot with youtube tutorials but not getting the answer plz help. | |
| |
hi i'm having trouble in sorting the text file in inorder traversal can anyone help me out? code: #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> struct TreeNode; typedef struct TreeNode *node; typedef char ElementType; struct TreeNode{ char element; node left, right; } *root; node insert(ElementType x,node t){ … |
The End.