GOT THE ANSWER :)
int main(int argc, char* argv[]){
char *d1;
char *s;
char d[50]="nslookup ";
//d1=(char *)malloc(70);
d1=argv[1];
s=(char *)malloc(500);
strcat(s,d);
Type: Posts; User: thriller500
GOT THE ANSWER :)
int main(int argc, char* argv[]){
char *d1;
char *s;
char d[50]="nslookup ";
//d1=(char *)malloc(70);
d1=argv[1];
s=(char *)malloc(500);
strcat(s,d);
I had to make a wrapper program on "nslookup" networking utility and I am facing the following "Segmentation Fault error"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int...
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
struct s
{ int i;
char c;
double d;
char a[];
1)Create a array...
2)increment it along with index..
int arr[10];
int master[10];
int i=0;
for(int index=0;index<=10;index++,i=i+2)
{
master[index]=index;
#include<iostream>
#include<string>
using namespace std;
class node
{
private:
int data;
node *left;
node *right;
public:
@salem
Thanks for inlining it sir:)
You Are Awesome..
Thanks Sir..
I thought it was initialised default to null
by adding
list()
{
root=NULL;
My program is binary serach tree...
how can i modify it so i can avoid file permission problems..
using ubuntu 12.10
I am not worried about the warnings..
i just want the code to compile....
#include<iostream>
using namespace std;
template <class t,class q>
t max(t a,q b)
{
return ((a>b)?a:b);
}
okay... i will change it..
More complex memory management (30 points)
Using a for loop, write an exponentiation function to compute the k-th
power of a matrix A = (a1,1 , . . . , al,l ) :
double **matrixExpon(double **a,...
The below problem is to find the kth power of a matrix.
#include<iostream>
using namespace std;
int main()
{
double **a;
int r,k;
i didnt understand what it meant..
can anyone please explain me...
#include<stdio.h>
#include<ctype.h>
#define ch(x)if(islower(x)){printf("hi");};
int main()
{
char j;
scanf("%c",&j);
ch(j);
thanks
header_cpp_file :
#include "bank_class.h"
#include<iostream>
#include<string>
using namespace std;
bank_class::bank_class()
{
balance=0;
what i want is:
string : target
character to replace with : r
OUTPUT :
rrrrrr
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
__wur;
* Get a newline-terminated string from stdin, removing the newline.
DO NOT USE THIS FUNCTION!! There...
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void xstrchr(char*,char);
int main()
{
char *target;
char s;
int l;
printf("Enter the target\t");
i got the problem...i didnt add & in the scanf function
^^i eliminated the dynamic allocation because i felt that is causing the problem..
i gave 3 inputs not n inputs ( i dunno think thats a problem) ..
Zuk
@ used it problem persists
Problem - A - Codeforces
i was solving this question..
using dynamically allocated memory as well as declaring arrays..
in both methods
after i give the input..
input : 3 10 1000
...
sorry i am new to coding.. had no idea about these styles..
it stopped working in the sense..
i am facing a problem somewhere in the functions...
i named the file as merge sort..
after i entered...
i was writing a recursive code for mergesort .. and when i am executing it.
after entering the array .. program stopped working..
Please help me...
here's the code..
#include<stdio.h>...