Trong ngôn ngữ lập trình Pascal cách khai báo xâu ký tự nào sau đây là sai

Cấu trúc khai báo kiểu xâu

Var : string [độ dài lớn nhất của xâu];

Trong đó: Biến xâu được đặt theo quy tắc đặt tên trong Pascal.

Độ dài xâu có thể có hoặc không, độ dài lớn nhất không quá 255 kí tự.

Đáp án: C

CÂU HỎI HOT CÙNG CHỦ ĐỀ

Trong ngôn ngữ lập trình Pascal, cách khai báo xâu ký tự nào sau đây là đúng?
Const n =50;

A.var S: string[50];

B.var S: string[n];

C.var S: string,

D.var S: xau[n];

Đáp án và lời giải

Đáp án:B

Lời giải:

Vậy đáp án đúng là B.

Câu hỏi thuộc đề thi sau. Bạn có muốn thi thử?

Bài tập trắc nghiệm 45 phút Bài 12: Kiểu xâu - CHƯƠNG IV: KIỂU DỮ LIỆU CÓ CẤU TRÚC - Tin học 11 - Đề số 3

Làm bài

Chia sẻ

Một số câu hỏi khác cùng bài thi.

  • Cho biết kết quả của biểu thức sau: DELETE[’THPT TAM NGAI’,5,5];

  • Trong ngôn ngữ lập trình pascal, đoạn chương trình sau thực hiện công việc gì? [S là xâu ký tự bất kỳ] S1:=’anh’; s2:=’em’; i:=pos[s2,s];
    While i0 do
    Begin
    Delete[s,i,2];
    Insert[s1,s,i];
    i:=pos[s2,s];
    End;

  • Cho biết kết quả của biểu thức sau: COPY [’TRUONG HOC AN TOAN’,8,3]?

  • Cho biết kết quả của biểu thức sau: LENGTH[’PHAM THAI BUONG’];

  • Trong ngôn ngữ lập trình pascal, hai xâu ký tự được so sánh dựa trên?

  • Trong Pascal, xâu không có kí tự nào được gọi là:

  • Cho biết kết quả của biểu thức sau: DELETE[’THPT TAM NGAI’,5,5];

  • Hãy cho biết kết quả của phép ghép xâu: ‘1’ + ‘2’ + ‘3’ là:

  • Khai báo nào sau đây là SAI:

  • Cho xâu A := ’Nguyen Binh’;
    hãy cho biết:

  • Cho S= 'Thu do Ha Noi', thủ tục Delete[S,1,6]; cho kết quả:

  • Hàm Copy[a,b,c] có nghĩa là:

  • Cú pháp của hàm nhập xâu a

  • Trong ngôn ngữ lập trình pascal, hàm Length[S] cho kết quả là gì?

  • Trong ngôn ngữ lập trình pascal, để in một xâu ký tự ra màn hình theo thứ tự ngược lại của các ký tự trong xâu S [VD: abcd thì in ra là dcba], đoạn chương trình nào sau đây thực hiện việc này?

  • Kết quả của đoạn chương trình sau:
    d := 0;
    for i:= 1 to length[S] do
    if S[i] = ' ' then d := d + 1;

  • Trong ngôn ngữ lập trình pascal, hàm Length[S] cho kết quả là gì?

  • Trong ngôn ngữ lập trình pascal, hàm Upcase[kt] cho kết quả là:

  • Cho biết kết quả của biểu thức sau: LENTH[’THPT TAM NGAI’];

  • Trong ngôn ngữ lập trình Pascal, cách khai báo xâu ký tự nào sau đây là đúng?
    Const n =50;

  • Tham chiếu đến phần tử của xâu được xác định bởi:

  • Cho biết kết quả của biểu thức sau: POS[’AN’,’CHUC MUNG BAN’]?

  • Cho biết kết quả của biểu thức sau: COPY [’TRUONG THPT TAM NGAI’,8,4]?

  • Trong ngôn ngữ lập trình pascal, với xâu ký tự ta có thể?

  • Cho a là biến kiểu xâu, đoạn chương trình sau làm gì?
    For i :=1 to length[a] do write[upcase[a [i]]];

Một số câu hỏi khác có thể bạn quan tâm.

  • Mark the letter A, B, C or D on your answer sheet to indicate the correct answer to each of the following questions

    He wanted to know _______.

  • Hiện tượng cộng hưởng thể hiện rõ nét nhất kh ?

  • Read the following passage and mark the letter A, B, C, or D on your answer sheet to indicate the correct answer to each of the questions from 43 to 50:

    Smallpox was the first widespread disease to be eliminated by human intervention. Known as a highly contagious viral disease, it broke out in Europe, causing the deaths of millions of people until the vaccination was invented by Edward Jenner around 1800. In many nations, it was a terror, a fatal disease until very recently. Its victims suffer high fever, vomiting and painful, itchy, pustules that left scars. In villages and cities all over the world, people were worried about suffering smallpox.In May, 1966, the World Health Organization [WHO], an agency of the United Nations was authorized to initiate a global campaign to eradicate smallpox. The goal was to eliminate the disease in one decade. At the time, the disease posed a serious threat to people in more than thirty nations. Because similar projects for malaria and yellow fever had failed, few believed that smallpox could actually be eradicated but eleven years after the initial organization of the campaign, no cases were reported in the field.The strategy was not only to provide mass vaccinations but also to isolate patients with active smallpox in order to contain the spread of the disease and to break the chain of human transmission. Rewards for reporting smallpox assisted in motivating the public to aid health workers. One by one, each small-pox victim was sought out, removed from contact with others and treated. At the same time, the entire village where the victim had lived was vaccinated.By April of 1978 WHO officials announced that they had isolated the last known case of the disease but health workers continued to search for new cases for additional years to be completely sure. In May, 1980, a formal statement was made to the global community. Today smallpox is no longer a threat to humanity. Routine vaccinations have been stopped worldwide.

    Question 49:Which one of the statements doesn’t refer to smallpox?

  • Một con lắc lò xo treo thẳng đứng, trong đó vật nặng được làm bằng kim loại. Tại vị trí cân bằng, lò xo dẫn một đoạn 1cm. Đặt dưới vật nặng một nam châm điện được duy trì hoạt động bằng một dòng điện xoay chiều. Biết rằng trong một chu kì của dòng điện có hai lần lực tác dụng lên hệ. Lấy

    . Để vật nặng dao động với biên độ mạnh nhất thì tần số của dòng điện là ?

  • Một hệ dao động có tần số riêng f0. Tác dụng vào hệ một ngoại lực biến thiên điều hòa có tần số f. Hiện tượng cộng hưởng xảy ra khi:

  • Read the following passage and mark the letter A, B, C, or D on your answer sheet to indicate the correct answer to each of the questions from 43 to 50:

    Smallpox was the first widespread disease to be eliminated by human intervention. Known as a highly contagious viral disease, it broke out in Europe, causing the deaths of millions of people until the vaccination was invented by Edward Jenner around 1800. In many nations, it was a terror, a fatal disease until very recently. Its victims suffer high fever, vomiting and painful, itchy, pustules that left scars. In villages and cities all over the world, people were worried about suffering smallpox.In May, 1966, the World Health Organization [WHO], an agency of the United Nations was authorized to initiate a global campaign to eradicate smallpox. The goal was to eliminate the disease in one decade. At the time, the disease posed a serious threat to people in more than thirty nations. Because similar projects for malaria and yellow fever had failed, few believed that smallpox could actually be eradicated but eleven years after the initial organization of the campaign, no cases were reported in the field.The strategy was not only to provide mass vaccinations but also to isolate patients with active smallpox in order to contain the spread of the disease and to break the chain of human transmission. Rewards for reporting smallpox assisted in motivating the public to aid health workers. One by one, each small-pox victim was sought out, removed from contact with others and treated. At the same time, the entire village where the victim had lived was vaccinated.By April of 1978 WHO officials announced that they had isolated the last known case of the disease but health workers continued to search for new cases for additional years to be completely sure. In May, 1980, a formal statement was made to the global community. Today smallpox is no longer a threat to humanity. Routine vaccinations have been stopped worldwide.

    Question 50:It can be inferred from the passage that ___________.

  • Dao động của con lắc đồng hồ là ?

  • Read the following passage and mark the letter A, B, C, or D on your answer sheet to indicate the correct answer to each of the questions from 43 to 50:

    Smallpox was the first widespread disease to be eliminated by human intervention. Known as a highly contagious viral disease, it broke out in Europe, causing the deaths of millions of people until the vaccination was invented by Edward Jenner around 1800. In many nations, it was a terror, a fatal disease until very recently. Its victims suffer high fever, vomiting and painful, itchy, pustules that left scars. In villages and cities all over the world, people were worried about suffering smallpox.In May, 1966, the World Health Organization [WHO], an agency of the United Nations was authorized to initiate a global campaign to eradicate smallpox. The goal was to eliminate the disease in one decade. At the time, the disease posed a serious threat to people in more than thirty nations. Because similar projects for malaria and yellow fever had failed, few believed that smallpox could actually be eradicated but eleven years after the initial organization of the campaign, no cases were reported in the field.The strategy was not only to provide mass vaccinations but also to isolate patients with active smallpox in order to contain the spread of the disease and to break the chain of human transmission. Rewards for reporting smallpox assisted in motivating the public to aid health workers. One by one, each small-pox victim was sought out, removed from contact with others and treated. At the same time, the entire village where the victim had lived was vaccinated.By April of 1978 WHO officials announced that they had isolated the last known case of the disease but health workers continued to search for new cases for additional years to be completely sure. In May, 1980, a formal statement was made to the global community. Today smallpox is no longer a threat to humanity. Routine vaccinations have been stopped worldwide.

    Question 47:According to the passage, what way was used to eliminate the spread of smallpox?

  • Hiện tượng cộng hưởng chỉ xẩy ra với:

  • Read the following passage and mark the letter A, B, C, or D on your answer sheet to indicate the correct answer to each of the questions from 43 to 50:

    Smallpox was the first widespread disease to be eliminated by human intervention. Known as a highly contagious viral disease, it broke out in Europe, causing the deaths of millions of people until the vaccination was invented by Edward Jenner around 1800. In many nations, it was a terror, a fatal disease until very recently. Its victims suffer high fever, vomiting and painful, itchy, pustules that left scars. In villages and cities all over the world, people were worried about suffering smallpox.In May, 1966, the World Health Organization [WHO], an agency of the United Nations was authorized to initiate a global campaign to eradicate smallpox. The goal was to eliminate the disease in one decade. At the time, the disease posed a serious threat to people in more than thirty nations. Because similar projects for malaria and yellow fever had failed, few believed that smallpox could actually be eradicated but eleven years after the initial organization of the campaign, no cases were reported in the field.The strategy was not only to provide mass vaccinations but also to isolate patients with active smallpox in order to contain the spread of the disease and to break the chain of human transmission. Rewards for reporting smallpox assisted in motivating the public to aid health workers. One by one, each small-pox victim was sought out, removed from contact with others and treated. At the same time, the entire village where the victim had lived was vaccinated.By April of 1978 WHO officials announced that they had isolated the last known case of the disease but health workers continued to search for new cases for additional years to be completely sure. In May, 1980, a formal statement was made to the global community. Today smallpox is no longer a threat to humanity. Routine vaccinations have been stopped worldwide.

    Question 48:How was the public motivated to help the health workers?

Video liên quan

Chủ Đề