Skip to main content
The 2024 Developer Survey results are live! See the results

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.

0 votes
2 answers
49 views

Is there any method to convert a varchar with specific format into time in Oracle SQL?

I have a table with three columns, one of the columns ateststatus_date has the following format: e.g: 28-MAY-24 11.57.20.000000 PM and it's defined as varchar(2). I used To_date() and ...
Matt's user avatar
  • 11
1 vote
2 answers
110 views

Why doesn't `char` lose data when an `int` is being assigned to it?

I'm a novice C programmer. I defined two variables int x = 0xffffffff and char y = x, thereafter I printed that using the printf("%x\n", y) function; I was expecting something like ff on the ...
Greeshma's user avatar
0 votes
0 answers
118 views

const char* vs std::string_view for constants [closed]

I usually use constexpr const char* for defining string constants. Of late, I have been noticing that std::string_view is very popular for this purpose. Which of these is the best? // 1. char pointer ...
0Nicholas's user avatar
  • 437
0 votes
1 answer
96 views

Adding elements into a char array

I've been trying to make a function in C that takes a string as the input and then prints out a version of that string that only contains alpha characters. #include <string.h> #include <ctype....
Lushana Elie's user avatar
0 votes
2 answers
88 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 ...
wtfamidoing's user avatar
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 ...
qquest's user avatar
  • 11
3 votes
2 answers
70 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 ...
iPc's user avatar
  • 53
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 ...
Dylan Carney's user avatar
-1 votes
1 answer
58 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 ...
Vokekov's user avatar
0 votes
0 answers
31 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'...
jguneratne's user avatar
0 votes
0 answers
57 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 ...
iPc's user avatar
  • 53
0 votes
2 answers
62 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 ----------------...
John Doe's user avatar
  • 10.1k
0 votes
3 answers
157 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 ...
bangingmyheadontable's user avatar
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 ...
kerstoff0mega's user avatar
-1 votes
3 answers
114 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 <...
avent's user avatar
  • 29

15 30 50 per page
1
2 3 4 5
894