gets Questions
4
It seems to me, people, especially when learning the C programming language, are still using the gets function to read in data from stdin. Despite that it has now been removed1 from the C11 s...
Annulet asked 5/3, 2013 at 13:54
2
I'm working on a project for my own personal leisure and learning. Part of it looks like this:
#include<stdio.h>
#include<string.h>
wgame()
{
char string3[12], string2[12], string...
5
Solved
#include <iostream>
using namespace std;
void main(){
char name[20];
gets(name);
cout<<name<<endl;
}
I can't found answer in google, function gets() is C or C++ language fun...
2
Solved
Will the gets() function from C language (e.g. from glibc) stop, if it reads a zero byte ('\0') from the file ?
Quick test: echo -ne 'AB\0CDE'
Thanks.
PS this question arises from comments in th...
2
I'm a ruby beginner. I have the following code which asks the user for his name and prints it back.
print 'Enter your name : '
name = gets()
print("Hey,#{name} !")
If I enter John Doe as t...
5
Solved
From man gets:
Never use gets(). Because it is
impossible to tell without knowing the
data in advance how many
characters gets() will read, and
because gets() will continue to store
charac...
Roughandtumble asked 4/6, 2010 at 20:26
2
Solved
I'm using gets to pause my script's output until the user hits the enter key. If I don't pass any arguments to my script then it works fine. However, if I pass any arguments to my script then gets ...
© 2022 - 2024 — McMap. All rights reserved.