Looking for Grundgebiete der Informatik 1 - Kleingruppen (TU) [24ws-61.30511] test answers and solutions? Browse our comprehensive collection of verified answers for Grundgebiete der Informatik 1 - Kleingruppen (TU) [24ws-61.30511] at moodle.rwth-aachen.de.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Geben Sie die Werte an, die die Variablen a, b und c nach Ausfuhrung der folgenden Programmzeilen annehmen:
1 int a = -2;2 unsigned int b = 8;3 signed char c = 0;45 a--;6 a <<= 3;7 a /= 12;8 a = a % 2;910 b >>= 1;11 b |= 3;12 b ^= 15;13 b += 1;1415 c = c - 17;16 c *= -1;17 c += 110;18 c = ~c ^ -1;
Zeile 5: a = Zeile 6: a = Zeile 7: a = Zeile 8: a =
Zeile 10: b = Zeile 11: b = Zeile 12: b = Zeile 13: b =
Zeile 15: c = Zeile 16: c = Zeile 17: c = Zeile 18: c =
Welche Ausgabe wird von der Funktion printf generiert?
#include <stdio.h>#define DEF(x) 8*x
int main(){ printf("%d", DEF(((-12)+(-3)))); return 0;}
Gegeben sind die folgenden Anweisungen. Berechnen Sie den Wert der Ausdrücke und geben Sie an, welcher Wert den Variablen nach Ausführung der Anweisungen zugewiesen wird.
1 int main()2 { 3 int i0, i1, i2, i3, i4; 4 double d0, d1, d2, d3, d4; 5 6 d0 = 3/4.0; 7 d1 = 3./4; 8 d2 = 3/4; 9 d3 = d0 + 2; 10 d4 = d2 + 2; 11 12 i0 = 3/4.0 + 2; 13 i1 = 5 - 3./4; 14 i2 = 3/4 + 2; 15 16 i3 = 4 + 1%3; 17 i4 = 5 * 8 % 3 / 2; 18 return 0; 19 }
d0 = d1 = d2 = d3 = d4 =
i0 = i1 = i2 = i3 = i4 =
Verhalten sich die beiden folgenden Programme gleich?
Programm 1
1 #include <stdio.h>2 #define MAX 30/* bis zu dieser Zahl wird getestet */3 #define TEILER 3 /* Teilbarkeit durch TEILER wird geprueft */4 5 int main() {6 int aktZahl = 1;/*aktuelle Zahl, die auf Teilbarkeit geprueft wird*/7 8 while(aktZahl <= MAX) {9 if(aktZahl%TEILER== 0)10 printf("%d ist durch %d teilbar.\n", aktZahl, TEILER);11 aktZahl = aktZahl + 1;12 }13 return 0;14 }
Programm 21 #include <stdio.h>2 #define MAX 30 /* bis zu dieser Zahl wird getestet */3 #define TEILER 3 /* Teilbarkeit durch TEILER wird geprueft */4 5 int main() {6 int aktZahl;/*aktuelle Zahl, die auf Teilbarkeit geprueft wird*/7 8 for(aktZahl = 1; aktZahl <= MAX; aktZahl++) {9 if(aktZahl%TEILER== 0) {10 printf("%d ist durch %d teilbar.\n", aktZahl, TEILER);11 }12 }13 return 0;14 }
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!