Posts
 
Reputation
Joined
Last Seen
Ranked #552
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
70% Quality Score
Upvotes Received
9
Posts with Upvotes
7
Upvoting Members
7
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
2
4 Commented Posts
0 Endorsements
Ranked #914
~31.7K People Reached
Interests
different kind of stuff
PC Specs
dell vostro v131, celeron 867, archlinux openbox
Favorite Forums
Favorite Tags
Member Avatar for alamu

please give the program for sorting a linked list without affecting the original value

Member Avatar for 4rajgopal
0
1K
Member Avatar for ram619

Hello, I am not able to understand whats happening behind "ptr-p", "*ptr-arr". Please explain #include<stdio.h> int main() { static int arr[]={0,1,2,3,4}; int *p[]={arr,arr+1,arr+2,arr+3,arr+4}; int **ptr=p; ptr++; printf("\n %d %d %d \n",ptr-p,*ptr-arr,**ptr); *ptr++; printf("\n %d %d %d \n",ptr-p,*ptr-arr,**ptr); *++ptr; printf("\n %d %d %d \n",ptr-p,*ptr-arr,**ptr); ++*ptr; printf("\n %d %d %d \n",ptr-p,*ptr-arr,**ptr); return …

Member Avatar for ram619
0
203
Member Avatar for tanatos.daniel

I have the following code: #include <iostream> #include <conio.h> using namespace std; long filesize(FILE *stream); int main(void) { FILE *stream; char c; int i=0,n; long lSize; stream = fopen("tanc.TXT", "r"); fseek (stream , 0 , SEEK_END); lSize = ftell (stream); rewind (stream); cout<<"Dati numarul de caractere:"; cin>>n; while(!feof(stream) && i<lSize) …

Member Avatar for Sokurenko
0
292
Member Avatar for vipulasri.2007

Write a program that reads a file, breaks each line into words, strips whitespace and punctuation from the words, and converts them to lowercase please help me out . thanks in advance

Member Avatar for vipulasri.2007
0
671
Member Avatar for saamsonn

I'm trying to write a code to take an image as argv[1] and save it in a new file "argv[2]" with the image flipped upside down, but my output does not open with any image viewer here's my full code. some one help me out please #include <stdio.h> #include <string.h> …

Member Avatar for BobS0327
0
3K
Member Avatar for dancks

code snippet: void checkcollision() { float x1 = tanks[0].x; float y1 = tanks[0].y; float x2 = tanks[1].x; float y2 = tanks[1].y; float dist = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); float dr = tanks[0].rad+tanks[1].rad; if(dist<dr); { printf("checkcollision read true\n"); printf("dist: %f, radius+radius: %f\n",dist,dr); goback(0); goback(1); } } output: checkcollision read true dist:363.159302, radius+radius:14.142136 …

Member Avatar for dancks
0
116
Member Avatar for dancks

Ok. As the title says I tried many times to simply write a program that rewrites a file to remove null characters. I confirmed with a hex editor that the file in question has tons on null characters, on average about 1 of every 2 characters in null. So my …

Member Avatar for dancks
0
419
Member Avatar for Learningvinit

A piece of C code was creating core dump. When i simply added a few fprintf statement and printed the value of variales used in code to a file, surprisingly the code ran successfully. I tried the scenario number of times and the result was same "when fprintf was present …

Member Avatar for Learningvinit
0
859
Member Avatar for billionair

I'm trying to make a C program to run DOS commands but I keep getting "illegal command" error. Here's the code. #include<stdio.h> #include<process.h> int main() { system("ipconfig/all"); return 0; }

Member Avatar for Ancient Dragon
0
774
Member Avatar for matt.malone.921

Develop a program to meet the following requirements: 1. Must use at least two functions, not including Main 2. Must use indirection (the * operator) 3. Must use a loop 4. Must use an array to hold the integers 5. Must take the integer inputs from a file Your assignment …

Member Avatar for Vish0203
-1
156
Member Avatar for matt.malone.921

#include <stdio.h> main() { FILE*fp ; if ((fp = fopen("new.txt","r")) == NULL); { printf("file could not be opened\n"); return 0; } } this is what ive written and it always comes back with file could not be opened. I need to read the text file new, which has 10 variables …

Member Avatar for Sokurenko
0
87
Member Avatar for shkr

i have the log file with byte dump and also structures.. using byte data as input i need to print the values of structures in user readable format..can anyone post the code.. here is txt file.. 002c2a54:00000000 00001389 11950000 00000000 00000000 00002b74 0000011c 00000000 002c2a74:01010100 01000000 0e600384 00000000 00000384 00000000 …

Member Avatar for Sokurenko
0
273
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> struct rithish { int roll; char name; }*s[20]; void main() { struct rithish *s; int i; for(i=0;i<2;i++) { printf("\n\n\t Enter roll : "); scanf("%d",&*s[i].roll); printf("\n\n\t enter name: "); scanf("%s",&*s[i].name); } } is it possible to do structure variable as pointer to array

Member Avatar for Schol-R-LEA
0
118
Member Avatar for shkr
Member Avatar for kodeeswari

I have to display the message only for a specific time. After that it should be erased from the display. how to do this program in c.

Member Avatar for Sokurenko
0
103
Member Avatar for manishanibhwani

if we print a float using %d garbage value is printed....but if we scan a float value using %d & int...the value gets truncated...What is the reason behind it...

Member Avatar for deceptikon
0
138
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> main() { char a[30]; int i,j,n,temp; printf("enter the limit: "); scanf("%d",n); printf("enter the string: "); for(i=0;i<n;i++) { scanf("%s",a[i]); } for(i=0;i<n-1;i++) { for(j=i+1;j<n;j++) { if(strlen(a[i])>strlen(a[j])) { temp=a[j]; a[i]=a[j]; a[j]=a[i]; } } } for(i=0;i<n;i++) { printf("%d",a[i]); } } compiler stops working here when executing the program but 0 …

Member Avatar for rithish
0
2K
Member Avatar for shanki himanshu

char str[]="S\065AB"; printf("\n%d", sizeof(str)); explain the output. i am getting 5.

Member Avatar for Banfa
0
531
Member Avatar for vijayabhaskar.chowdary

1) Write a program to make commandline calculator ? Format like that : excutablefile firstoperand opertator secondoperand Ex : ./a.out 1 + 3 result : 5

Member Avatar for WaltP
-1
87
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> void main() { char str[10],str1[10],str2[20]; int i,j,k; printf("enter string1: "); gets(str1); printf("enter the string 2: "); gets(str2); for(i=0,j=0;str1[i]!='\0';i++,j++) str[j]=str[i]; for(i=0,k=j;str2[i]!='\0';i++,k++) str[k]=str2[i]; printf("%s",str); } not producing correct output

Member Avatar for Sokurenko
0
225
Member Avatar for I_m_rude

hi.... int x=30, *y,*z; y=&x; assume x address is 500 and int is of 4 bytes z=y; *y++=*z++; x++; printf("%d %d %d",x,y,z); i want to ask that how the value of y is 504 here ? firstly value of z is assigned to value of y. then z is incremented …

Member Avatar for I_m_rude
0
194
Member Avatar for shanki himanshu

Why the program is running without line 14? #include<stdio.h> #include<iostream> //#include<conio.h> //#include<math.h> #define FOR(i,a,b) for(int i=a;i<b;i++) using namespace std; int main() { int a[]={1,2,3,4,5,6,7,8,9,10}; int *b; //b=(int *) malloc(sizeof(a)); b=a; //cout<<b; FOR(i,0,10) cout<<b[i]<<" "; //cout<<sizeof(b); //getch(); return 0; }

Member Avatar for shanki himanshu
0
96
Member Avatar for I_m_rude

hello, I am learning C from past 1 year, Now, I want to improve my coding skills by learning techniques like dynamic programming, backtracking and all that stuff. Can u please tell me or give me links from where i can learn, practise and improve these skills ? please help …

Member Avatar for I_m_rude
0
104
Member Avatar for on93

need help for this question Calculate the biggest of four integers. The user inputs four integers. Your program will determine the biggest of these four numbers and print out an appropriate message, specifying this biggest value. You are required to implement and use the following functions for this task: int …

Member Avatar for on93
0
121
Member Avatar for Skrell

First, i'm new to C and trying to teach it to myself so be gentle. All i'm trying to do is malloc a block of memory so that i can store a few strings. These strings are to be pointed at by an array of pointers so that as i …

Member Avatar for Skrell
0
97
Member Avatar for sparsh610

hey starting data structers through pointers , i don't know how to reverse a singly linklist? pls help

Member Avatar for sethlahaul
0
167
Member Avatar for lastbencher

I made the following functions for deleting a node of a singly linked list. 1. Can these functions be improved furthur? 2. Is it necessary to free the memory of the node that is deleted? nodep deleteByValue(nodep p, int value) { nodep temp = p; if(temp->data == value) return temp->next; …

Member Avatar for sethlahaul
0
212
Member Avatar for monmondiesel

Hi, I am running Ubuntu 12 on Virtual box and I am using GCC to compile this simple C program that has simple OpenMp pragmas : #include <stdio.h> #include <omp.h> #define MAX 10000000000 void main() { unsigned long long i,j,k,l; int threadnumber; #pragma omp parallel shared(i,j,k,l) { threadnumber = omp_get_thread_num(); …

Member Avatar for Sokurenko
0
1K
Member Avatar for jesskavidja

Hey there, I'm having issues with a custom string tokenizer I'm using for an assignment. I've looked around and haven't managed to find anything that really answers my question, so here goes nothing. Whenever I run the program and it runs the tokenizer, I get a seg fault. I'm fairly …

Member Avatar for Sokurenko
0
282
Member Avatar for sparsh610

hello friends, i have some problem with the concept of singly link list,,, don't know how to read it backward pls help

Member Avatar for mike_2000_17
0
843