logo

Crowdly

Basic Programming

Looking for Basic Programming test answers and solutions? Browse our comprehensive collection of verified answers for Basic Programming at moodle.usthlearningsupport.vn.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

What is the output of the following code?

    #include <stdio.h>

#define SQUARE(x) x*x

int main() {

int a = 3;

printf("%d", SQUARE(a+1));

return 0;

}

View this question
What is the size of `int` in most modern compilers?
View this question

What will happen when this program runs?

    #include <stdio.h>

int main() {

int i = 5;

for (; i >= 0; i--) {

printf("%d ", i);

i++;

}

return 0;

}

View this question

What will be the output of the following code?

#include <stdio.h>

void main() {

char str[] = "Hello";

printf("%c", str[6]);

}

View this question

What will be the output of the following C code?

#include <stdio.h>

int main() {

int x = 2, y = 5;

printf("%d", x & y);

return 0;

}

View this question
Which function is used to read a character from a file in C?
View this question

#include <stdio.h>

void main() {

int x = 5;

if (x < 1)

printf("hello");

if (x == 5)

printf("hi");

else

printf("no");

}

What is the output?

View this question

What does the following code print?

#include <stdio.h>

#define SQUARE(x) x*x

int main() {

printf("%d", SQUARE(4+1));

return 0;

}

0%
100%
0%
0%
View this question

What will be the output of the following C program?

#include <stdio.h>

void main() {

int arr[] = {1, 2, 3, 4, 5};

printf("%d", *(arr + 2));

}

View this question
Which symbol is used to define a preprocessor directive in C?
100%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.usthlearningsupport.vn?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!