C# study - Sheet1 Flashcards
(149 cards)
In .NET, you don’t immediately create operating system-specific native code. Instead, you compile into Common Intermediate Language code.
T
What is the term for the .Net method of freeing up unused memory?
Garbage Collection
C# is a typesafe language.
T
Console applications are simple command-line applications
T
What type of language is C#
block-structured language
What are comments for?
Adding descriptive text to code.
Name four integer types.
byte, short, int, long
A string is a sequence of numbers
F
Give an example of a camelcase variable name.
firstName
What are the allowed value of Boolean?
True or False
What are the 3 categories that operators can be divided into
Unary, Binary, Ternary
Variables are chunks of data that have a name and a type.
T
What are the three branching techniques available in C#?
Ternary, If, Switch
In a switch statement, it is legal to execute more than one case.
T
Looping refers to the repeated execution of statements.
T
How do implicit and explicit conversions differ?
Implicit: conversion is possible in all circumstances, and the compiler can do it. Explicit: conversion is possible only in certain circumstances.
Structs can’t have different data types in them
F
What is the term for variable in a struct?
data members
What is a struct?
data structures that are composed of several pieces of data, possibly of different types.
How many base types are in an array?
1
How do you declare an array?
[] ;
What do foreach loops enable?
Enables you to address each element in an array.
A jagged array is an array of arrays of different lengths.
T
When a function returns a value, you have to specify the type in the function declaration, and use the return keyword at the end of the function’s execution.
T