Questions tagged [char]
char refers to the character data-type, representing letters, digits, punctuation marks, control characters, etc. Use this tag for questions relating to and usage of the character data-type.
13,400
questions
0
votes
2
answers
70
views
How to change the value of char in C++
Hi I'm completely new to C++.
I have an assignment that is asking us to "Change the value to 97".
The first part of the task is to make a character and give it the value 'a'. Then print ...
1
vote
1
answer
80
views
Fetching unexpected results from WHRE clause with bpchar and character varying fields
I am new to PostgreSQL.
In my Postgres 14.8 database I have a students table. When executing the query:
SELECT stud_id, batch_type, subject, jdate ,subj_id, sdtime, subj_hours
FROM studs
ORDER BY ...
3
votes
2
answers
69
views
fwscanf failing to read UTF-8 CSV file correctly in C
This program can only use libraries of the C standard.
I'm trying to read a UTF-8 encoded CSV file in C using fwscanf, but I'm encountering issues with the reading process. The file contains rows with ...
1
vote
2
answers
133
views
Displaying the literal char for all ASCII codes
Have a problem with a challenge in my C++ class.
The goal is to output all ASCII characters from 0-127 with 16 characters per line.
What we have had an issue with is certain chars such as 10 (\n) are ...
-1
votes
1
answer
48
views
How to find the longest subsequence containing all vowels in order in a string in Python?
I am working on a problem where I need to find the length of the longest subsequence in a given string that contains all the vowels (a, e, i, o, u) in order and no vowels out of order. The vowels can ...
0
votes
0
answers
30
views
HTML Bundler Webpack Plugin: Source Tag Error
I am working on a photography portfolio website that I was originally building with the HTML Webpack Plugin, but recently decided to attempt to rebuild it with the newer HTML Bundler Webpack Plugin.
I'...
0
votes
0
answers
55
views
Italian Text Frequency Analyzer: Handling Special Characters and Accents
The program works well overall; however, it encounters an issue when it processes accented words. When the program encounters words with accented characters, it stops functioning correctly. The exact ...
0
votes
2
answers
60
views
SAS day of week name to char (downame.)
I have a date variable and want to create a new variable with the name of the day of the week.
I use the following for this.
a.date format=DOWNAME. AS DayOfWeek
date | DayOfWeek
----------------...
0
votes
3
answers
156
views
can you typecast an int into 4 chars using structs?
this is my idea:
int main(){
struct mystruct {
char a;
char b;
char c;
char d;
};
struct mystruct structinstance;
//1094795585 is in binary: 01000001 01000001 01000001 01000001 -to ...
3
votes
3
answers
99
views
How can I make char string array in C have dynamic size?
C language
I'm writing a function that relies later on on generating some text that has to hold the length of essentially: 115 letters minus the length of substring within <> from the original ...
-1
votes
3
answers
113
views
Getting random symbols after trying to replace chars in C++
I'm trying to replace every letter in string to next letter (a -> b, c -> d, etc.).
I get random symbols or XXXX after compiling and running the program.
#include <iostream>
#include <...
0
votes
1
answer
86
views
why cant i access the location in char pointer array with dereference to int pointer as index
im making a project and i was getting an error out of nowhere supposedly so i went into debug mode and couldn't find the error but the error only occurred in a specific place so i copied the code and ...
0
votes
0
answers
33
views
Shift char* array to left [duplicate]
This is my code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int i, j, k;
int arr_size = 5;
char* data[] = {"1234567", "1234576", "1234756&...
0
votes
1
answer
41
views
logic gates codingame struggles
Im new to C and i really need your help
Detail: https://www.codingame.com/training/easy/logic-gates
All of that works okey (for me), except printf("%c ",output_name[0][i]);
My idea is print ...
1
vote
2
answers
51
views
I am running a conditional loop to iterate through an Array to validate that the user only entered digits. Error when I make the comparison to NULL
As the title says. I am making a program where it takes in command line argument from the user and it encrypts the message. Before the user enters the message, they are required to make an 'encryption'...