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 68
Ngày làm bài: Hôm nay lúc 06:53:16 (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-
Which of the following statements are correct about the below C-program?
#include<stdio.h>
int main()
{
    int x = 10, y = 100%90, i;
    for(i=1; i<10; i++)
    if(x != y);
        printf("x = %d y = %d\n", x, y);
    return 0;
}
1 : The printf() function is called 10 times.
2 : The program will produce the output x = 10 y = 10
3 : The ; after the if(x!=y) will NOT produce an error.
4 : The program will not produce output.
  A - 
1
  B - 
2, 3
  C - 
3, 4
  D - 
4
2-
What will be the output of the program?
#include<stdio.h>
int main()
{
    int k, num=30;
    k = (num>5 ? (num <=10 ? 100 : 200): 500);
    printf("%d\n", num);
    return 0;
}

  A - 
200
  B - 
30
  C - 
100
  D - 
500
3-
Point out the error in the following program.
#include<stdio.h>
int main()
{
    struct emp
    {
        char name[20];
        float sal;
    };
    struct emp e[10];
    int i;
    for(i=0; i<=9; i++)
        scanf("%s %f", e[i].name, &e[i].sal);
    return 0;
}

  A - 
Floating point formats not linked (Run time error)
  B - 
Suspicious pointer conversion
  C - 
Cannot use scanf() for structures
  D - 
Strings cannot be nested inside structures
4-
The keyword used to transfer control from a function back to the calling function is
  A - 
switch
  B - 
goto
  C - 
go back
  D - 
return
5-
Which of the following statements are correct about the function?
long fun(int num)
{
    int i;
    long f=1;
    for(i=1; i<=num; i++)
        f = f * i;
    return f;
}

  A - 
The function calculates the value of 1 raised to power num.
  B - 
The function calculates the square root of an integer
  C - 
The function calculates the factorial value of an integer
  D - 
None of above
6-
Which of the statements is correct about the program?
#include<stdio.h>

int main()
{
    float a=3.14;
    char *j;
    j = (char*)&a;
    printf("%d\n", *j);
    return 0;
}

  A - 
It prints ASCII value of the binary number present in the first byte of a float variable a.
  B - 
It prints character equivalent of the binary number present in the first byte of a float variable a.
  C - 
It will print 3
  D - 
It will print a garbage value
7-
Will the program compile in Turbo C?
#include<stdio.h>
int main()
{
    int a=10, *j;
    void *k;
    j=k=&a;
    j++;
    k++;
    printf("%u %u\n", j, k);
    return 0;
}

  A - 
Yes
  B - 
No
8-
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 - 
2,4
  B - 
2,3
  C - 
1
  D - 
1,4
9-
The library function used to find the last occurrence of a character in a string is
  A - 
strnstr()
  B - 
laststr()
  C - 
strrchr()
  D - 
strstr()
10-
If char=1, int=4, and float=4 bytes size, What will be the output of the program ?
#include<stdio.h>

int main()
{
    char ch = 'A';
    printf("%d, %d, %d", sizeof(ch), sizeof('A'), sizeof(3.14f));
    return 0;
}

  A - 
1, 2, 4
  B - 
2, 4, 8
  C - 
2, 2, 4
  D - 
1, 4, 4
 
[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 Java - Bài 47
Trắc Nghiệm ASP.NET (English) - Bài 11
Trắc Nghiệm Java - Bài 03
Trắc Nghiệm Thiết Kế Web - Bài 08
Trắc Nghiệm ASP.NET (English) - Bài 17
Trắc Nghiệm Visual Basic - Bài 38
Trắc Nghiệm Visual Basic - Bài 27
Trắc nghiệm Linux ( English ) - Bài 31
Trắc Nghiệm Pascal - Bài 01
Trắc Nghiệm Visual Basic - Bài 18
Trắc Nghiệm Java - Bài 19
Trắc Nghiệm ASP.NET - Bài 06
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 07
Trắc nghiệm CSS - Bài 01
Trắc Nghiệm Pascal - Bài 04
Trắc Nghiệm ASP.NET (English) - Bài 29
Trắc Nghiệm C# - Bài 36
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 44
Trắc Nghiệm Pascal - Bài 11
Trắc Nghiệm Java - Bài 37
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