python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Storing a string in char pointer (using scanf)
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
char *s1;
char *s2;
printf("Enter the string : ");
scanf("%s",s1);
pr...
Deepak
Votes: 0
Answers: 2
Pointer printing first char of string
#include <iostream>
using namespace std;
char* input(char **S);
int main()
{
char **S = new char *;
char *K = input(S);
//cout << K << endl;
cout << *K <&l...
Ron
Votes: 0
Answers: 1
When I write my own strchr function, there is a part in the return step that I don't understand
I'm trying to write my own strchr function for school, but there is something I don't understand.
char *ft_strchr(const char *s, int c)
{
size_t i;
size_t len;
i = -1;
len = ft_s...

user13101974
Votes: 0
Answers: 1