[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572023-105":53,"doc-detail-572023-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","uva-hspc-c-cheatsheet-quick-reference","UVa HSPC C++ Cheatsheet - Quick Reference","","UVa HSPC C++ Cheatsheet serves as a compact quick reference for core C++ fundamentals. It summarizes primitive data types, common arithmetic and logical operations, variable declaration and assignment patterns, and standard control flow constructs including if, while, and for loops. The sheet also includes practical string handling examples, array indexing, function declaration structure, basic math functions via math.h, and straightforward input/output using iostream with cin and cout. Finally, it covers core data structures such as vector and map with minimal usage snippets.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/uva-hspc-c-cheatsheet-quick-reference/572023/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/uva-hspc-c-cheatsheet-quick-reference/572023.png","ImageObject",442,249,{"name":88,"@type":89},"Jordan Avery","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-22","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",7,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"What are the primitive data types included in the cheatsheet?","Question",{"text":109,"@type":110},"It lists int, float, double, bool, and char, with brief bit-width and meaning for each.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"Which operations are summarized for arithmetic, comparison, and logical logic?",{"text":114,"@type":110},"It covers arithmetic (+, -, /, %) plus comparison operators (==, !=, \u003C, >, \u003C=, >=) and logical operators (&&, !, ||).",{"name":116,"@type":107,"acceptedAnswer":117},"How does the cheatsheet demonstrate using strings, arrays, and maps in C++?",{"text":118,"@type":110},"Strings show basic creation, comparison, concatenation, indexing, and find. Arrays show declaration, element assignment, and indexing access. Maps show creation of a string-to-string dictionary and retrieving a value by key.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},572023,1792014301,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":73,"language":136,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":61,"update_tm":140,"read_time":9},1099523882367,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","UVa HSPC C++ Cheatsheet  \nPrimitive Data Types  \n\n| int | 32-bit signed two’s complement integer |\n| --- | --- |\n| float | 32-bit floating point number |\n| double | 64-bit floating point number |\n| bool | Data type with two possible values: true or false |\n| char | 8-bit ASCII character |\n\nOperations  \n\n| + | Arithmetic addition or String concatenation |\n| --- | --- |\n| - | Arithmetic subtraction |\n| / | Arithmetic division |\n| % | Integer division reminder (modulus) |\n| ++ | Increment |\n| -- | Decrement |\n| == | Equality |\n| != | Inequality |\n| \u003C | Less than |\n| > | Greater than |\n| \u003C= | Less than or equal |\n| >= | Greater than or equal |\n| && | Logical AND |\n| ! | Logical NOT |\n| || | Logical OR |\n\nVariable Declaration and Assignment  \nint  \nTYPE  \nindex  \nNAME  \n=  \nASSIGNMENT  \n0; VALUE  \nIf Statement  \nif ( Boolean Expression ){  \nStatements;  \n}  \nWhile Loop  \nwhile ( Boolean Expression ){  \nStatements;  \n}  \nFor Loop  \nfor ( Initialization ; Termination ; Increment ){  \nStatements;  \n}  \nStrings  \n\\#include \u003Cstring> string a = “UVa”;  \nCreates the string a with value “Uva”.  \nstring b = “HSPC”;  \nCreates the string b with value “HSPC”.  \nboolean [falseValue = a.](falseValue = a.compare)[compare](falseValue = a.compare)(b) ; a does not have the same value as b.  \nchar letterU = a [0 ] ; The first character of a is the letter 'U' .  \nint zero = a .find(“U”);  \nThe letter “U” is the first character in the string a. int minusOne = a .find(“X”);  \nThe letter “X” does not appear in the string, returning-1 . string uvaHSPC = a + b;  \nThe newly created string is “UVAHSPC”.  \nArrays  \nint[] array = new int[size]; ARRAY TYPE NAME ARRAY LENGTH  \narray[index] = 50;  \nint fifty = array[index];  \nFunction Declaration  \nint factorial (int n)  \nRETURN TYPE METHOD NAME ARGUMENTS  \nint factorial(int n){/*body*/  \n}  \nUVa HSPC C++ Cheatsheet  \nMath  \n\\#include \u003Cmath .h>  \nAll return doubles. Angles are in radians.  \n\n| exp(1.0) | The base of the natural logarithm. |\n| --- | --- |\n| sin(ang) | Computes the sine of ang. |\n| cos(ang) | Computes the cosine of ang. |\n| tan(ang) | Computes the tangent of ang. |\n| asin(ang) | Computes the inverse sine of ang. |\n| log(a) | The natural logarithm of a. |\n| sq rt(a) | The square-root of a. |\n| pow(a, b) | Raises a to the power of b. |\n| fabs(a) | Returns the absolute value a. |\n\nInput  \nusing namespace std;  \n\\#include \u003Ciostream>  \ncin >> declaredInt;  \nReads an integer from standard input.  \ncin >> declaredString; Reads a string from standard input.  \ncin >> declaredDouble; Reads a double from standard input.  \nOutput  \ncout \u003C\u003C “Print the value : ” \u003C\u003C dog \u003C\u003C endl;  \nPrints out a the string and the value of the variable dog with a new line.  \nData Structures  \nVector  \nusing namespace std;  \n\\#include \u003Cvector> vector\u003Cint> list(20); Creates a new vector of integers .  \nlist [0 ] = 1 ;  \nAssigns the first element of the list to1 .  \ncout \u003C\u003C list [0 ] ;  \nPrints the first element of the list, the number 1.  \nMap  \nusing namespace std;  \n\\#include \u003Cmap>  \nmap\u003Cstring , string> dict; Creates a mapping from strings to strings. dict[“Dog”] = “Cat”;  \nMaps the string “Dog”(key) to “Cat”(value) . cout \u003C\u003C dict[“Dog”] \u003C\u003C “\\n”;  \nRetrieves the value for the key “Dog” and prints the word “Cat”.","cbCaikR6Hqhl2j89","https://ap.wps.com/l/cbCaikR6Hqhl2j89","pdf",68789,"English","# Primitive Data Types\n# Operations\n# Variable Declaration and Assignment\n# If Statement\n# While Loop\n# For Loop\n# Strings\n# Arrays\n# Function Declaration\n# Math\n# Input\n# Output\n# Data Structures\n## Vector\n## Map","[{\"question\":\"What are the primitive data types included in the cheatsheet?\",\"answer\":\"It lists int, float, double, bool, and char, with brief bit-width and meaning for each.\"},{\"question\":\"Which operations are summarized for arithmetic, comparison, and logical logic?\",\"answer\":\"It covers arithmetic (+, -, /, %) plus comparison operators (==, !=, \\u003c, \\u003e, \\u003c=, \\u003e=) and logical operators (\\u0026\\u0026, !, ||).\"},{\"question\":\"How does the cheatsheet demonstrate using strings, arrays, and maps in C++?\",\"answer\":\"Strings show basic creation, comparison, concatenation, indexing, and find. Arrays show declaration, element assignment, and indexing access. Maps show creation of a string-to-string dictionary and retrieving a value by key.\"}]","UVa HSPC C++ Cheatsheet - Quick Reference | PDF",1791925094]