Posts by vhbsouza • 412 points
7 posts
-
10
votes2
answers808
viewsQ: What are the size limits of variables in Ruby?
I would like to know the size limit of variables of the following types: String - How many characters can I have in a single string? Integer and Float - What is the largest and smallest number that…
-
1
votes3
answers156
viewsA: What name is given to code modeling/notation?
@Anislanwesley, I believe what you’re looking for is simply a pseudocode. Several types of pseudocodes are found on the Internet, each with a characteristic syntax. When I learned to program I…
pseudocodeanswered vhbsouza 412 -
5
votes1
answer8101
viewsA: Know the line number of a txt file in c
Without opening the file I believe that there is no way to get this information. But if you use UNIX you can use the command wc to find the number of lines. wc nomedoarquivo If you decide to open…
-
8
votes3
answers21946
viewsQ: How to exchange the value between two variables without using auxiliary variable?
I learned to code in C, but recently I have studied RUBY. Ruby allows us to exchange the value between two variables easily and without using an auxiliary variable, thus: a, b = b, a Without using…
-
0
votes2
answers3217
viewsA: split an array into several parts
As in C, the variable only stores the beginning of the vector. You can play with the function mempcy and copy a memory block #define NUM 1000 char** string = malloc(NUM * sizeof(char *)); char**…
-
2
votes3
answers1538
viewsA: Display from 1 to 1000 in C++ without using a semicolon
A possible solution: #include <stdio.h> #include <stdlib.h> int main(int num=0,char**){ if(printf("%d\t",++num) && (&main + (&exit - &main)*(num/1000))(num+1)){} }…
-
1
votes2
answers4640
views