15,551 Topics
| |
int main(){ int near * ptr=( int *)0XFFFF; ptr++; ptr++; printf(ā%pā,ptr); return 0; } Output:0003 why the op is 3 and how to convert 0XFFFF into its decimal equivalent? | |
I have been having trouble developing a function that frees all of the memory associated with structs of a linked list. Im not asking for a clear cut answer, just an idea or a function that can aid. F.Y.I. the linked list contains a head struct and a tail struct … | |
Hi all, I would like to call a makefile with a particular variable and value so that the variable is used to make decisions inside the makefile. Thanks | |
Hi!!! I'm trying to pass 2d array to function and i can't. In general i'm trying to print chess board in action. The board is an integer.I need a function that gets 2d array in specific place and returns correlatedm char. const int pawn = 1; const int rook = … | |
Hi,I want to write a program that calculate the increment and new salary of employee based on the average of three evaluation points.(using pass by reference/pass by value). I've done the coding but the output is wrong. I think there's a mistake on the call function. #include<stdio.h> float get_increment(float *a); … | |
What i'm trying to do is use a loop that prompts the user to re-enter a new string of numbers if what he previously entered is not within the specified range of 1-16. What I have is not working as expected. What am I doing wrong? [CODE] /* Program assignment … | |
I'm writing a program that takes records(first and last name,id and mark), reads them from a file and inserts the information in StudentRecord structures. For some reason,when I go to list the information, the first and last name strings in each structures are all the same. The first and last … | |
I have to make a project, where the user can see the student's fee records. He can also modify, delete and add a new record. But i am getting problem while running it. Anyone can please help me :( here is my program #include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> int main() { … | |
if(strcmp(s.name, stdname)==0) is this statment is correct? i am having an error while executing this statment.. i have givn its headerfile | |
I have to parse different fields of PAT table in this file... the file looks like this in hex editor... 47 40 00 10 00 00 B0 0D 00 00 C3 00 00 00 01 E0 21 63 0D 38 1E ...... ....... my code is [CODE] /*parse1.c*/ [B][COLOR="Green"] #include … | |
How to delete a node in a Singly Linked List using a pointer that points to the node? (Assume that you cannot traverse the list to find the previous node) -- With Regards Vishnu | |
The output of this code is "lice ice ce e". Seems to be string array is acting like a circular array. But how is it possible ???? [CODE=c]#include<stdio.h> #include<conio.h> void main() { int i,n; char *x="Alice"; clrscr(); n=strlen(x); *x=x[n]; for(i=0;i<n;i++) { printf("%s ",x); x++; } getch(); }[/CODE] | |
Hi there) Guys - if anybody know about a good articles (or something like that - what will be usefull to read) on the topic "[B]file system driver[/B] creation -[B] C language[/B]" - please give link or advice). I need something not too sophisticate for begining. big thanks in advance) | |
I'm a beginner to C and programming in general, so I have a question concerning an issue with my code. I want to be able to add binary numbers (represented as strings) taken from the command line. Currently, if I add the strings '1010' to '1101', my program returns '0111' … | |
Why Does this code Leads to Infinite Loop????? [CODE=c]#include<stdio.h> #include<conio.h> int reverse(int); void main() { int no=5; reverse(no); getch(); } int reverse(int no) { if(no==0) { return 0; } else { printf("%d",no); } reverse(no--); }[/CODE] | |
Could anyone please tell me whats happenning in line number 10 and 12. The output of this code is 2 and 0. [CODE=c]#include<stdio.h> #include<conio.h> void main() { int arr[3]={2,3,4}; char *p; clrscr(); p=arr; p=(char*)((int*)(p)); printf("%d\n",*p); p=(int*)(p+1); printf("%d",*p); getch(); }[/CODE] | |
I'm a college student learning how to program in C. We recently got an assignment to transpose a list of names. We have to read in from a file a list of names and print them out and write to a file with the names going downwards. I'm not asking … | |
I have written a code to be able to produce an image where i can choose a background colour and then draw a line of chosen colour on top. The problem I am having is that I can't get the program to be able to produce vertical and horizontal lines … | |
The result of this code is 65535 But I believe that for && both sides must hold true (rather one side being true is enough for ||) so how come the result is 65535 ????? when after 5++ the first condition becomes false ????? Thanks in advance [CODE=c]#include<stdio.h> #include<conio.h> void … | |
#include<stdio.h> # define SQ(r) r * r main() { int x = 2; int i = SQ(++x); printf("%d\n" ,i); } In the above code, how the result will be 16. If i give r * r * r, the result will be 80. how can it be possible. can anyone … | |
Hi i am requiring some assistance on how to create a converter using the xcode, if someone could please provide some suitable material, books, links to relevant websites etc on how this could be done it would be very much appreciated. Warm regards Ryan | |
I got an assignment to create a program to sort 10 students' data by grade (and if they have the same grade sort by name) using selection sort only(can't use any other method) in an ascending order. My problem is I can sort their grades using selection just fine but … | |
I am a beginner to computer graphics and I have to add animations to the image of my national flag which look like this. I have designed the flag alright.But I don't know what kinds of animations are possible and how. Could someone please guide me how to add animations … | |
Ok... i ran my quicksort program on my college lab's machine (i dunno its config) and it took 4 seconds on avg to sort 1 million elements. I ran it on my lappy (4 gb RAM, Intel Core i5-2410M Processor (2.3 GHz)) and it took 0.83 seconds to run the … | |
This code is supposed to take two numbers, and multiply them, divide them and print out the product and quotient. ive checked it over numerous times and cannot figure out where my error is, when i type in a real number and 0, the result screen shuts off prematurely..can anyone … | |
[CODE] main() { char *p="dcis"; while(*p++!='\0'); printf("%s",p); } [/CODE] Why this is printing %s in my unix box with gcc 4.6.1 ? | |
Hello every one...I have a project in which I must visualize different kinds of sorts in C by using GTK+ library. I mean it must show the numbers moving and getting sorted! I don't have any idea how to start and how to make the numbers move! I`ll really appreciate … | |
[CODE]#include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include<dos.h> #include<math.h> void midline(int,int,int,int); void main(void) { int gdriver = DETECT, gmode, errorcode; int xmax, ymax; initgraph(&gdriver, &gmode, ""); errorcode = graphresult(); if (errorcode != grOk) { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); } setcolor(getmaxcolor()); int x1,y1,x2,y2; … |
The End.