stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
CONCEPTS IN C extended Flashcards | StudBud
Explore
/
CONCEPTS IN C extended
CONCEPTS IN C extended
10 terms
·
StudBud Administration
·
14 plays
BASIC CONCEPTS #cpp #programming
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
int
tab[] = {12, 23, 34, 45, 56, 67, 78, 89, 90}; check right answer(s)
*(tab + 1) vaut 23
tab[8] vaut 90
(tab + 4) vaut 56
tab[2] vaut 23
2
int a = 1; int *pa = &a; int *pb = pa; a++;
pb vaut 2
*pb vaut 1
pb vaut 1
*pb vaut 2
3
val = -10000; for (int i = 0; i < size; i++) if (val < array[i]) val = array[i];
val contains the mean value of array
val contains the min value of array
val contains the max value of array
value equals -10000
4
the wrong one is... ?
int *pa = malloc ( sizeof( int ));
int *pa= &pb;
int *pa=NULL;
int *pa = malloc ( 10 * sizeof( int ));
5
The TD3 about array.c was...
really too much (over 10h work)
super hard (6h+ work)
sort of easy
hard (over 4h work)
6
/*! \brief header to create Complex */
is not a valid C comment
is useless
is a standard (Doxygen) comment
is not compiling
7
Quelle declaration...
int c[]= 1,2,3 ;
int c[3] = ( 1,2,3 );
int c[3]={ 1,2,3 };
int c[3]=[ 1,2,3 ];
8
char s[]="hie", t[]="hie"; if(s==t) cout<<"equal";
this program has no output
this program outputs unequal strings
this program outputs equal strings
this program does not compile
9
Which best data type can be used to hold a byte in C ?
long
short
none of those
unsigned char
10
best signature is...
int add( int a, int b);
int add(const int a, const int b);
int add(const int a, const int b) const;
const int add(const int a, const int b);