+ 2
Is there a way to do a list comprehension in C similar to the way python does it?
Basically I'm trying to do this: arr = [for i in range(65, 91)] I'm completely lost and new to C, any help would be appreciated.
2 Respostas
+ 3
As built-in syntax or syntactic sugar: no. C does not even have built-in collection types like C++ has, or python.
What you can do is simulate this behaviour with functions.
+ 1
Is this kinda like what you want?
https://code.sololearn.com/cysSweKJWKpK/?ref=app