Tìm kiếm:
TRANG NHÀ
Giới thiệu VNEDU.ORG
Điều khoản và bản quyền
Liên lạc VNEDU
TRẮC NGHIỆM TRỰC TUYẾN
---Công Cụ:---
Soạn Biểu thức
Bảng màu HTML
Ký hiệu đặc biệt 01
Ký hiệu đặc biệt 02
Ký hiệu đặc biệt 03
Ký hiệu đặc biệt 04
Ký hiệu đặc biệt 05
Ký hiệu đặc biệt 06
Ký hiệu đặc biệt 07
Ký hiệu đặc biệt [Toán]
Tin Học   ||  Căn Bản    Văn Phòng    Hệ Thống - Mạng    Phần Mềm Ứng Dụng    Kỹ thuật số    Lập trình    SQL  

Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 31
Ngày làm bài: Hôm nay lúc 09:28:57 (Server time)
Số câu hỏi: 10.   Tổng điểm: 10
Yêu cầu hoàn thành: 60 phút.
Thời gian còn lại: 
Cỡ chữ câu hỏi:  Cỡ chữ đáp án:


1-
What will be the output of the program ?
#include<stdio.h>

int main()
{
    int arr[1]={10};
    printf("%d\n", 0[arr]);
    return 0;
}

  A - 
1
  B - 
10
  C - 
0
  D - 
6
2-
What will be the output of the program if the array begins at address 65486?
#include<stdio.h>

int main()
{
    int arr[] = {12, 14, 15, 23, 45};
    printf("%u, %u\n", arr, &arr);
    return 0;
}

  A - 
65486, 65488
  B - 
65486, 65486
  C - 
65486, 65490
  D - 
65486, 65487
3-
What will be the output of the program ?
#include<stdio.h>

int main()
{
    float arr[] = {12.4, 2.3, 4.5, 6.7};
    printf("%d\n", sizeof(arr)/sizeof(arr[0]));
    return 0;
}

  A - 
5
  B - 
4
  C - 
6
  D - 
7
4-
What will be the output of the program if the array begins 1200 in memory?
#include<stdio.h>

int main()
{
    int arr[]={2, 3, 4, 1, 6};
    printf("%u, %u, %u\n", arr, &arr[0], &arr);
    return 0;
}

  A - 
1200, 1202, 1204
  B - 
1200, 1200, 1200
  C - 
1200, 1204, 1208
  D - 
1200, 1202, 1200
5-
Which of the following is correct way to define the function fun() in the below program?
#include<stdio.h>

int main()
{
    int a[3][4];
    fun(a);
    return 0;
}

  A - 
void fun(int p[][4])
{
}
  B - 
void fun(int *p[4])
{
}
  C - 
void fun(int *p[][4])
{
}
  D - 
void fun(int *p[3][4])
{
}
6-
Which of the following statements mentioning the name of the array begins DOES NOT yield the base address?
1: When array name is used with the sizeof operator.
2: When array name is operand of the & operator.
3: When array name is passed to scanf() function.
4: When array name is passed to printf() function.
  A - 
A
  B - 
A, B
  C - 
B
  D - 
B, D
7-
Which of the following statements are correct about the program below?
#include<stdio.h>

int main()
{
    int size, i;
    scanf("%d", &size);
    int arr[size];
    for(i=1; i<=size; i++)
    {
        scanf("%d", arr[i]);
        printf("%d", arr[i]);
    }
    return 0;
}
 
  A - 
The code is erroneous since the subscript for array used in for loop is in the range 1 to size.
  B - 
The code is erroneous since the values of array are getting scanned through the loop.
  C - 
The code is erroneous since the statement declaring array is invalid.
  D - 
The code is correct and runs successfully.
8-
Which of the following statements are correct about 6 used in the program?
int num[6];
num[6]=21;
  A - 
In the first statement 6 specifies a particular element, whereas in the second statement it specifies a type.
  B - 
In the first statement 6 specifies a array size, whereas in the second statement it specifies a particular element of array.
  C - 
In the first statement 6 specifies a particular element, whereas in the second statement it specifies a array size.
  D - 
In both the statement 6 specifies array size.
9-
Which of the following statements are correct about an array?
1: The array int num[26]; can store 26 elements.
2: The expression num[1] designates the very first element in the array.
3: It is necessary to initialize the array at the time of declaration.
4: The declaration num[SIZE] is allowed if SIZE is a macro.
  A - 
1
  B - 
1,4
  C - 
2,3
  D - 
2,4
10-
Is there any difference int the following declarations?
int fun(int arr[]);
int fun(int arr[2]);
  A - 
Yes
  B - 
No
 
[Người đăng: Thành Lãm - ST]
Ghé thăm Kênh của Vị Sư "hai lần chết đi sống lại"
Tu Si Chau Soc Thon

https://www.youtube.com/channel/UCoyC9WTTVR-M3qpTKKEXGnQ

Chau Soc Thon Official Channel


Phong Bảo Official
Phong Bao Official
Xem Nhiều nhất
Trắc Nghiệm Pascal - Bài 20
Trắc Nghiệm ASP.NET - Bài 12
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 16
Trắc Nghiệm ASP.NET - Bài 01
Trắc Nghiệm ASP.NET - Bài 03
Trắc nghiệm C++ - Bài 18
Trắc Nghiệm C# - Bài 53
Trắc Nghiệm ASP.NET - Bài 02
Trắc Nghiệm C# - Bài 42
Trắc Nghiệm Java - Bài 01
Trắc Nghiệm ASP.NET - Bài 04
Trắc Nghiệm Pascal - Bài 22
Trắc Nghiệm ASP.NET - Bài 13
Trắc Nghiệm ASP.NET - Bài 09
Trắc Nghiệm ASP.NET - Bài 08
Trắc nghiệm PHP - Bài 01
Trắc Nghiệm ASP.NET - Bài 06
Trắc Nghiệm ASP.NET - Bài 11
Trắc Nghiệm ASP.NET - Bài 05
Trắc Nghiệm ASP.NET - Bài 23
Đề Xuất
Trắc Nghiệm Thiết Kế Web - Bài 05
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 17
Trắc Nghiệm Visual Basic - Bài 22
Trắc Nghiệm Java - Bài 44
Trắc Nghiệm ASP.NET (English) - Bài 31
Trắc nghiệm XML - Bài 25
Trắc Nghiệm Java - Bài 11
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 08
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 05
Trắc nghiệm Linux ( English ) - Bài 32
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 02
Trắc Nghiệm C Sharp - Bài 23
Trắc Nghiệm Pascal - Bài 25
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 61
Trắc Nghiệm ASP.NET (English) - Bài 15
Trắc nghiệm Linux - Bài 57
Trắc nghiệm Linux - Bài 53
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 19
Trắc Nghiệm Thiết Kế Web - Bài 18
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 25
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG

free counters