Skip to content
  • Home
  • CCNA Labs
    • CCNA 1 LAB Activities (v6 & v7)
    • CCNA 2 LAB Activities (v6 & v7)
    • CCNA 3 LAB Activities (v6 & v7)
    • CCNA 4 Lab Activities
  • Linux
    • Linux Unhatched
    • Linux Essentials 2.0
    • Linux Essentials
    • Introduction to Linux I
    • Introduction to Linux II
  • Programming
    • PCAP – Programming Essentials in Python
    • CLA – Programming Essentials in C
    • CPA Programming Essentials in C++
  • About
    • Contact Us
    • Privacy Policy

CCNA 7 Exam Answers 2023

Go with our CCIE, Passed 100%

  • ITE
    • ITE - IT Essentials v7.0
    • ITE - IT Essentials v6.0
      • IT Essentials Lab 2019
    • ITE v5.0 Exam
    • Virtual Activity Laptop
    • Virtual Activity Desktop
  • NE
    • MF
  • CCNA
    • CCNA1
      • CCNA1 v7.0 – ITN
      • CCNA1 v6.0
    • CCNA2
      • CCNA2 v7.0 – SRWE
      • CCNA2 v6.0
    • CCNA3
      • CCNA3 v7.0 – ENSA
      • CCNA3 v6.0
    • CCNA4
      • CCNA4 v6.0
  • Cyber-Security
    • ITC – Introduction to Cybersecurity 2.1 (Level 1)
    • CE – Cybersecurity Essentials 1.1 (Level 2)
    • CCNA CyberOps 1.1 (Level 3)
  • Security
    • CCNA Security v2
  • DevNet
  • CCNA PT Lab 2023

CLA – Programming Essentials in C Quizzes Mock Test Online

Last Updated on May 20, 2021 by Admin

CLA – Programming Essentials in C Quizzes Mock Test Online

CLA – Mock Test

Time limit: 0

Quiz-summary

0 of 40 questions completed

Questions:

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40

Information

CLA – Mock Test

You have already completed the quiz before. Hence you can not start it again.

Quiz is loading...

You must sign in or sign up to start the quiz.

You have to finish following quiz, to start this quiz:

Results

0 of 40 questions answered correctly

Your time:

Time has elapsed

You have reached 0 of 0 points, (0)

Average score
 
 
Your score
 
 

Categories

  1. Not categorized 0%
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  1. Answered
  2. Review
  1. Question 1 of 40
    1. Question
    1 points

    What is the value of the following integer literal?

    017
    Correct

    Incorrect

  2. Question 2 of 40
    2. Question
    1 points

    What is the value of the following integer literal?

    0x17
    Correct

    Incorrect

  3. Question 3 of 40
    3. Question
    1 points
    Which of the following strings is a valid variable name?
    Correct

    Incorrect

  4. Question 4 of 40
    4. Question
    1 points
    Which of the following declarations is valid?
    Correct

    Incorrect

  5. Question 5 of 40
    5. Question
    1 points

    What is the value of the X variable at the end of the following snippet?

        int X = 8;
        X = X - X / 2;
        X = X * X / 4;
        X = X + 2 * X;
    Correct

    Incorrect

  6. Question 6 of 40
    6. Question
    1 points

    What is the value of the X variable at the end of the following snippet?

        float X = 2.0;
        X = X + X * 4;
        X = X / X * X;
        X = X / X + X;
    Correct

    Incorrect

  7. Question 7 of 40
    7. Question
    1 points

    Which of the following strings is a proper floating-point number (in the “C” language sense)?

    Correct

    Incorrect

  8. Question 8 of 40
    8. Question
    1 points

    What is the value of the Y variable at the end of the following snippet?

        int X = 1, Y = X + 2, Z = Y++;
    
        Z = X / Y * --X * Y--;
    Correct

    Incorrect

  9. Question 9 of 40
    9. Question
    1 points

    What is the value of the X variable at the end of the following snippet?

        int X;
    
        X = ('r' - 's') * ('A' / 'Z');
    Correct

    Incorrect

  10. Question 10 of 40
    10. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h>
        int main(void) {
            int x = 1, y = 1;
            float k = -1e0, m = 2e1;
            printf("%d\n", (x >= y) + (x >= y) + (k >= y) + (m >= k) + ('q' <= 'z'));
            return 0;
        }
    Correct

    Incorrect

  11. Question 11 of 40
    11. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h>
        int main(void) {
            int i = 1;
            if(i = 0)
            	i = 2;
            else
            	i = 3;
            printf("%d\n",i);
            return 0;
        }
    Correct

    Incorrect

  12. Question 12 of 40
    12. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i = 1, j = 0;
            do {
            	i *= 2;
            	j += i / 2;
            } while(j < 1);
            printf("%d",i + j); 
            return 0; 
        }
    Correct

    Incorrect

  13. Question 13 of 40
    13. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i = 5, j = 16;
            while(j >= 0) {
            	i /= 2;
            	j -= i / 2;
            } 
            printf("%d",i + j); 
            return 0; 
        }
    Correct

    Incorrect

  14. Question 14 of 40
    14. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i = 1, j;
            for(j = 0; j ; j--) 
            	i *= 2;
            printf("%d",i + j); 
            return 0; 
        }
    Correct

    Incorrect

  15. Question 15 of 40
    15. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i = -1, j = 1;
            for(i++; i++; i++) 
            	j++;
            printf("%d",i + j); 
            return 0; 
        }
    Correct

    Incorrect

  16. Question 16 of 40
    16. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i = 1, j = 0, k;
            k = (i >> j) + (j >> i) + (i >> i) + (j >> j);
            k <<= i;
            printf("%d", k); 
            return 0; 
        }
    Correct

    Incorrect

  17. Question 17 of 40
    17. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i = 3, j = i - 2 * i;
            switch(i - j) {
            	case  1: j++;
            	case  2: j--;
            	case  0: j++; break;
            	default: j = 0;
            }
            printf("%d", ++j); 
            return 0; 
        }
    Correct

    Incorrect

  18. Question 18 of 40
    18. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i = 5, j = i - 4 * i;
            switch(j) {
            	default: j = 2;
            	case  1: j--; break;
            	case  2: j++;
            	case  0: j--; break;
            }
            printf("%d", j++); 
            return 0; 
        }
    Correct

    Incorrect

  19. Question 19 of 40
    19. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i, t[4];
            for(i = 0; i < 3; i++) {
            	t[i] = 4 - i;
            	t[i + 1] = 2 * t[i];
            }
            printf("%d\n", t[2]);
            return 0; 
        }
    Correct

    Incorrect

  20. Question 20 of 40
    20. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            int i, s = 0, t[] = {16, 8, 4, 2, 1, 0};
            for(i = 5; t[i] > 2; i /= 2) 
            	s += t[i];
            printf("%d\n", s);
            return 0; 
        }
    Correct

    Incorrect

  21. Question 21 of 40
    21. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            char t[] = { 'x', 'z', 'Y', 'Z', '2' , '0'};
            printf("%d\n", t[t[1] - t[0] - t[3] + t[2] + 3] - t[5]);
            return 0; 
        }
    Correct

    Incorrect

  22. Question 22 of 40
    22. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            float a = 3.14E0, *b = &a, **c = &b;
            **c = a + (a == *b);
            printf("%f", a);
            return 0; 
        }
    Correct

    Incorrect

  23. Question 23 of 40
    23. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            char t[4][4];
            printf("%d\n",sizeof(t) / sizeof(t[0]) / sizeof(t[0][0]));
            return 0; 
        }
    Correct

    Incorrect

  24. Question 24 of 40
    24. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            char *p = "\0\2\1\3\4";
            printf("%d\n", p[p[2]] + *(p + 1) + p[0]);
            return 0; 
        }
    Correct

    Incorrect

  25. Question 25 of 40
    25. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        #include <string.h>
        int main(void) { 
            char tt[20] = "9081726354";
            strcpy(tt, tt + 3);
            printf("%d\n", strlen(tt) - tt[9] + '5');
            return 0; 
        }
    Correct

    Incorrect

  26. Question 26 of 40
    26. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        #include <string.h>
        int main(void) { 
            char tt[20] = "0123456789";
            strcat(tt + 11, "123");
            printf("%d\n", strlen(tt) - tt[8] + '0');
            return 0; 
        }
    Correct

    Incorrect

  27. Question 27 of 40
    27. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        #include <stdlib.h>
        int main(void) { 
            float *t = 1 + (float *) malloc(sizeof(float) * sizeof(float));
            t--;
            *t = 8.0;
            t[1] = *t / 4.0;
            t++;
            t[-1] = *t / 2.0;
            printf("%f\n",*t);
            free(--t);
            return 0; 
        }
    Correct

    Incorrect

  28. Question 28 of 40
    28. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        #include <string.h>
        struct S {
            char S[8];
        };
        int main(void) { 
            struct S S = { 'a', 'b', 'c', 'd' };
            printf("%d", sizeof(S.S) - strlen(S.S) + S.S[4]); 
            return 0; 
        }
    Correct

    Incorrect

  29. Question 29 of 40
    29. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        #include <string.h>
        #include <stdlib.h>
        struct S {
            char *S;
        };
    
        int main(void) { 
            struct S *S = (struct S *) malloc(sizeof(struct S));
            S -> S = "123\0""45678";
            printf("%d", strlen(S -> S + 5) + S -> S[3]); 
            free(S);
            return 0; 
        }
    Correct

    Incorrect

  30. Question 30 of 40
    30. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        struct S {
            int Var;
            struct S *Str;
        };
        int main(void) { 
            struct S S[] = { { 8, NULL }, { 4, &S[0] }, { 2, &S[1] } };
            printf("%d", S[2].Str->Str->Var);
            return 0; 
        }
    Correct

    Incorrect

  31. Question 31 of 40
    31. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int fun(int *t) {
            return *(t + 3);
        }
        int main(void) { 
            int arr[] = { 3, 2, 1, 0 };
            printf("%d\n", fun(arr - 2));
            return 0; 
        }
    Correct

    Incorrect

  32. Question 32 of 40
    32. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        float f(float v) { 
            	v = v / 2.0;
            return v + v;
        } 
        int main(void) { 
            float x = 4; 
            f(x); 
            printf("%f",x); 
            return 0; 
        }
    Correct

    Incorrect

  33. Question 33 of 40
    33. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        char *f(char *p) { 
            return p += 2;
        } 
        char *g(char *p) {
            return --p;
        }
        int main(void) { 
            char *s = "ABCDEFGHIJ";
            char  p = *f(g(f(s + 1)));
            printf("%d",p - 'A'); 
            return 0; 
        }
    Correct

    Incorrect

  34. Question 34 of 40
    34. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        struct S {
            int S[3];
        };
        void f(struct S S) { 
            S.S[0] = S.S[1] + S.S[2] - 4;
        } 
        int main(void) { 
            struct S S = { { 1, 4, 2 } };
            f(S);
            printf("%d",S.S[1] * S.S[0]); 
            return 0; 
        }
    Correct

    Incorrect

  35. Question 35 of 40
    35. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        struct S {
            int S[3];
        };
        void f(struct S *S) { 
            S->S[2] = 6 * S->S[0] + S -> S[1];
        } 
        int main(void) { 
            struct S S = { { 1, 2 } }, *P = &S;
            f(P);
            printf("%d",S.S[2] / S.S[0]); 
            return 0; 
        }
    Correct

    Incorrect

  36. Question 36 of 40
    36. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        #include <string.h>
        char *f(int p, char *s) { 
            s[p + 2] = '\0';
            return s - 1;
        } 
        int main(void) { 
            char s[] = "ABCDEF";
            int i = strlen(f(1,s + 2));
            printf("%d\n",i); 
            return 0; 
        }
    Correct

    Incorrect

  37. Question 37 of 40
    37. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        int main(void) { 
            char s[20] = "?"; 
            FILE *f = fopen("fopen","w"); 
            int i = fputs("789",f); 
            fclose(f); 
            f = fopen("fopen","r"); 
            fgets(s + 1,3,f); 
            printf("%c\n", s[2] - s[3]); 
            fclose(f); 
            return 0; 
        }
    Correct

    Incorrect

  38. Question 38 of 40
    38. Question
    1 points

    What happens if you try to compile and run this program?

        #include <stdio.h> 
        #define  ONE    1
        #define  TWO 	ONE + ONE
        int main(void) { 
            int i = 2;
            i = i - 2 * TWO;
            printf("%d\n", i);
            return 0; 
        }
    Correct

    Incorrect

  39. Question 39 of 40
    39. Question
    1 points

    What is the meaning of the following declaration?

        float *f(int);
    Correct

    Incorrect

  40. Question 40 of 40
    40. Question
    1 points

    Select the proper form for the following declaration:
    ptr is a pointer to pointer to pointer to double

    Correct

    Incorrect

  • CCNA1 v7
  • CCNA2 v7
  • CCNA3 v7
System Test Exam Answers
Modules 1 – 3 Exam Answers
Modules 4 – 7 Exam Answers
Modules 8 – 10 Exam Answers
Modules 11 – 13 Exam Answers
Modules 14 – 15 Exam Answers
Modules 16 – 17 Exam Answers
Practice Final – ITN Answers
Course Feedback
ITN Practice PT Skills Assessment (PTSA)
Final Exam Answers
Modules 1 – 4 Exam Answers
Modules 5 – 6 Exam Answers
Modules 7 – 9 Exam Answers
Modules 10 – 13 Exam Answers
Modules 14 – 16 Exam Answers
ITN Practice Skills Assessment – PT Answers
SRWE Practice Skills Assessment – PT Part 1 Answers
SRWE Practice Skills Assessment – PT Part 2 Answers
SRWE Hands On Skills Exam Answers
SRWE Practice Final Exam Answers
SRWE Final Exam Answers 
Modules 1 – 2 Exam Answers
Modules 3 – 5 Exam Answers
Modules 6 – 8 Exam Answers
Modules 9 – 12 Exam Answers
Modules 13 – 14 Exam Answers
ITN Practice PT Skills Assessment (PTSA) Answers
SRWE Practice PT Skills Assessment (PTSA) – Part 1 Answers
SRWE Practice PT Skills Assessment (PTSA) – Part 2 Answers
ENSA Practice PT Skills Assessment (PTSA) Answers
ENSA Hands On Skills Exam Answers
Practice Final – ENSA Answers
ENSA Final Exam Answers
CCNA Certification Practice Exam Answers

Copyright © 2023 PressExam.