Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
67% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
0 Endorsements
~32.1K People Reached
PC Specs
Linux
Favorite Tags
Member Avatar for ram619

Hello everyone! this is a code to reverse strings of a array of char ptr. I am passing the char* array, dynamically allocating memory to reverse and link with the char* array. The print it gives in the str_rev() are perfect. But when I print same thing in main(), it …

Member Avatar for David W
0
201
Member Avatar for ram619

Hello Everyone, I got this question in some book. As per question we need to find a substring in a array of char* and replace it with another string. The program I wrote doesn't work. I tried using strcpy as well char by char. Please help me to figure out …

Member Avatar for ram619
0
337
Member Avatar for ram619

Hello, day's greet!! I was trying to pass a 3D array. But the following code generate error. Please tell me where am I wrong and why. Thanks a lot !!!! #include<stdio.h> void print_all(int [][][],int,int,int); int main() { int degree=3, row=2, col=3; int arr[3][2][3] = { {1,2,3, 4,5,6 }, {7,8,9, 10,11,12 …

Member Avatar for ram619
0
216
Member Avatar for ram619

What is the maximum buffer size allowed in memecpy() function in c, I am using GCC compiler,32-bit system, What is the affecting factor for memcpy failure? ->Alignment issue? ->Size? however the buffer size 256bytes not working, tried 160 bytes copy which fits our requirement

Member Avatar for ram619
0
3K
Member Avatar for ram619

Hello, I want to duplicate a list in python. The way I want is, I need two list with same content pointing to different memory Location. What I tried is Dup_List = Original_List[:] , but lookes like even this is making both list point to same memory location. Both the …

Member Avatar for vegaseat
0
168
Member Avatar for ram619

Hi, I have a device connected to the USB port of the laptop. This device pumps data to the port which is read by the python script. As per the baudrate of the board I use folowing configuration to open the port. Serial(options.port,921600,timeout=0.2,xonxoff=0,rtscts=1) But when I analyse the collected LOG …

Member Avatar for Ewald Horn
0
2K
Member Avatar for ram619

Hello, in this code snippet I am not able to understand line 8 and 10. Here at line 8, char* is getting typecasted as int* then again, getting typecasted as char*. Please explain. #include<stdio.h> int main() { int arr[3] = {2,3,4}; char *p; p = arr; p = (char*)((int*) (p)); …

Member Avatar for Razahcy
0
216
Member Avatar for ram619

The output of this code is -1, 4, 4. I am not sure about this -1. Is it because when all bits are set then in decimal it means -1 ? #include<stdio.h> int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit={1,4,4}; printf("%d %d %d",bit.bit1, bit.bit3, bit.bit4); …

Member Avatar for Ancient Dragon
0
140
Member Avatar for ram619

The output of this code is char *str="char *str=%c%s%c;main(){printf(str,34,str,34);}";main(){printf(str,34,str,34);} I don't know how this is happening. Please explain. #include<stdio.h> char *str = "char *str=%c%s%c;main(){printf(str,34,str,34);}"; int main() { printf(str,34,str,34); return 1; }

Member Avatar for sepp2k
0
354
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 ram619

In this code at line number 7, 'p' is a 1D pointer then how come at the print statement it is being considered as 2D pointer ? and when we do 'a+1' then it would cross whole array. I am not able to understand this code. Please explain. Expected output …

Member Avatar for ram619
0
224
Member Avatar for ram619

The output of this snippet is 4 and 1. 4 is ok but why this 1 ???? #include<stdio.h> int main() { printf("%d %d",sizeof(NULL),sizeof("")); return 0; }

Member Avatar for ram619
0
104
Member Avatar for ram619

Hello,I have written this script to telnet from Ubuntu system to windows7 running system. This script goes fine upto login name, then it takes the password but it is not able to process the password. Although it looks as if the password has reached other side but in real it …

Member Avatar for ram619
0
1K
Member Avatar for ram619

Hello, the output of this code is 'ef' but if we add up a "newline" print after this print then the output becomes 'efd'. Then why in earlier scenerio the 'd' was not getting printed ? Thanks in advance. #include<stdio.h> int main() { printf("\nab\bcd\ref"); }

Member Avatar for Rahul47
0
508
Member Avatar for ram619

Hello, This code is from "Test Your C Skills" Book. In the book they have mentioned that this code won't work, and thats true. But I am not able to understand, why its not working. Please explain why it gives error. #include<stdio.h> #define SWAP(a,b,c) c t;t=a;a=b;b=t; int main() { float …

Member Avatar for ram619
0
180
Member Avatar for ram619

Hello......I have written a script in which I am telnetting from system1 to system2. There from system2 I am doing ssh to system3. This system3 is a Embedded Board running Linux. Here on system3 I am executing a code that gives me a CLI interface. In this CLI we have …

Member Avatar for ram619
0
173
Member Avatar for ram619

Hello, I need to write a python script for performing telnet between two windows machine, that is Host and Client. After doing Telnet Successfully I need to run some application on other machine and there in that application I need to give commands via my script aswell after giving command …

Member Avatar for ram619
0
13K
Member Avatar for raavn111

I want to buy a printer with scanner and xerox please give me suggestion .............

Member Avatar for manojrea
0
103
Member Avatar for ram619

Hi, this code is compiling successfully, but giving "segmentation fault" when I am trying to copy data to shared memory. Please tell me where I am wrong. Thanks a lot............ #include<stdio.h> #include<sys/ipc.h> #include<sys/shm.h> #include<sys/types.h> #include<unistd.h> #include<stdlib.h> #include<errno.h> #include<string.h> int main() { int id=-1, status=-1; char *check=NULL; char *p="you"; const size_t …

Member Avatar for ram619
0
424
Member Avatar for ram619

Hi, can anyone please tell me how to create a array of 20 crore (200000000) elements. I tried, but getting runtime error, might be that much memory is not available. Thanks

Member Avatar for Adak
0
201
Member Avatar for Lightninghawk

I have an interesting browser hijacker that randomly redirects me whenever I click a search link, and recently even if I paste a direct url into the address bar it will redirect. I've been away from this field for a bit and am a little rusty, but I have ran …

Member Avatar for gerbil
0
280
Member Avatar for swiss21

#include <stdio.h> #include <float.h> float grosssalarycalc(float value1,float value2){ float gsalary; gsalary=value1+value2; return (gsalary); } float ovtmpayoutcalc(float value1){ float ovtmpayout; ovtmpayout=25*value1; return (ovtmpayout); } float netpayoutcalc(float value1){ float netsalary; netsalary=value1-(value1*0.20); return (netsalary); } int main() { char name[32]; float ovtmpayout0,gross,net,ovtmhrs,salary; printf("Payroll Calculation Program\n"); printf("Employee, please enter your name:\n"); scanf("%s", name); printf("Employee, …

Member Avatar for ram619
0
143
Member Avatar for tofumaker

int x = 0; int i,j,p; int buf[4]; int *array[5] = {0}; for (j = 0; j < 3; j++){ for (i = 0; i <4; i++) { buf[i] = x++; } array[j] = buf; } int* temp; temp = array[1]; for (i = 0; i<4; i++) { printf("%d\n", *temp); …

Member Avatar for deceptikon
0
156
Member Avatar for raavn111

How to accept strings and print then them please explain me with example if possible Thanks in advance .............

Member Avatar for deceptikon
-1
136
Member Avatar for idlackage

I have this code: sigc::connection conns[4]; And I get this error: Program received signal SIGSEGV, Segmentation fault. 0x00f4b620 in g_type_check_instance_is_a () What does this mean?

Member Avatar for ram619
0
49
Member Avatar for jville kip

write a pseudo code of a program that prompts you to enter grades of 100 students .the possible grades A,B,C,D and F. The program should count the total number of each grade entred and then print them out

Member Avatar for AleMonteiro
-5
149
Member Avatar for mkbutan

i have put one FUNCTION (Display) in the code's but still not functional is there any way by which we can convert BCD to DEC code's and can be printed out as output I know its wrong please help me to make it right thanks [ the CODE's is for …

Member Avatar for ram619
0
138
Member Avatar for ram619

This code is crashing, please tell me for what all I need to assign memory. Thanks #include<stdio.h> #include<conio.h> #include<stdlib.h> struct s1 { char *p1; }; struct s2 { struct s1 *p2; }; struct s3 { struct s2 *p3; }*p4=NULL; int main() { char a='a'; p4=malloc(sizeof(struct s3)); p4->p3->p2->p1=&a; printf("%c",*(p4->p3->p2->p1)); return 0; …

Member Avatar for ram619
0
127
Member Avatar for ram619

The output is 2011. Can anyone plz tell me how it is so ????[CODE=c]#include<stdio.h> #include<conio.h> void main() { char c[]="GATE2011"; char *p=c; clrscr(); printf("%s",p+p[3]-p[1]); getch(); }[/CODE]

Member Avatar for ram619
0
113
Member Avatar for ram619

The output of this code is "hhe!". Upto "hhe" I can figure out what is happening but, where does this "!" came from? ASCII value of "!" is 33 and here I don't think we are anyhow getting this value. Thanks in advance[CODE=c]#include<stdio.h> #include<conio.h> void main() { static char s[25]="The …

Member Avatar for ram619
0
201