fa
Feedback
C PROGRAMMING

C PROGRAMMING

رفتن به کانال در Telegram

🚩 Channel was restricted by Telegram

نمایش بیشتر
اطلاعاتی وجود ندارد
مشترکین
-824 ساعت
-347 روز
+8830 روز
آرشیو پست ها
Output of above code?
Anonymous voting

#include <stdio.h>

int main() {
    int x = 10;
    int *ptr = &x;
    *ptr = 20;
    printf("%d\n", x);
    return 0;
}

500 TB Tutorials + Books + Courses + Trainings + Workshops 🔥 Link - https://drive.google.com/drive/u/0/folders/1CgN7DE3pNRNh
500 TB Tutorials + Books + Courses + Trainings + Workshops 🔥 Link - https://drive.google.com/drive/u/0/folders/1CgN7DE3pNRNh_4BA_zrrMLqWz6KquwuD 👉Free Study Resources join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl Subscribe Our channel for coding, designing, hacking and computer related 👉✅ https://youtube.com/@CODEBOMBB

Output of above code 🙄
Anonymous voting

The output of the following C program is #include< stdio.h > struct Ournode{ char x,y,z; }; int main(){ struct Ournode p = {‘1’, ‘0’, ‘a’+2}; struct Ournode *q = &p; printf (“%c, %c”, *((char*)q+1), *((char*)q+2)); return 0; } ‼️🔥

Program to find day on a particular date
int isLeapYear(int year){
    if(year%4==0){
        if(year%100==0 && year%400!=0){
            return 0;
        }
        else{
            return 1;
        }
    }
    else{
        return 0;
    }
}

int main() {
    int year;
    int refYear=1600, leap=0;
    int diff, totalDays,day,month, oddDays;
    int lYear[]={3,1,3,2,3,2,3,3,2,3,2,3};
        int nYear[]={3,0,3,2,3,2,3,3,2,3,2,3};
    char  week[7][10]={"sunday",
                   "monday",
                   "tuesday",
                   "wednesday"
                   ,"thursday"
                   ,"friday",
                   "saturday"};
     printf("Enter a date between  1600 to 3000\n");
      scanf("%d%d%d",&day,&month,&year);
    diff = year - refYear;
    while(refYear < year){
        if(isLeapYear(refYear))
            leap++;
        refYear++;
    }
    totalDays = leap*366 + (diff-leap)*365;
    oddDays = totalDays%7;
     
    if(isLeapYear(year)){
        for(int i=0;i<month-1;i++){
            oddDays+=lYear[i];
        }
        oddDays+=day%7;
    }
    else{
        for(int i=0;i<month-1;i++){
            oddDays+=nYear[i];
        }
        oddDays+=day%7;
    }
    printf("Day on %d/%d/%d ",day,month,year);
    printf("%s",week[(5+oddDays)%7]);
    return 0;
}
#program_by : @lalitjangra142

How is a single-line comment written in C?
Anonymous voting

What is the output of printf("%d", 5/2); in C? %
Anonymous voting

What is the purpose of the "scanf" function in C?
Anonymous voting

What is the purpose of the "if" statement in C?
Anonymous voting

What does the "sizeof" operator in C return?
Anonymous voting

How do you include the standard input/output library in a C program?
Anonymous voting

Which operator is used for finding the remainder of the division in C?
Anonymous voting

What will be the output of above code?
Anonymous voting


#include <stdio.h>
int main() {
    int x = 5;
    printf("%d", x++);
    return 0;
}

Which individual is often referred to as the "father of C" programming language?
Anonymous voting

🔰 Abdul Bari : Courses 🔰 Size: 157GB 🔗 Link - https://mega.nz/folder/QkwEGAII#0CDNw-mvSDJYcB603RYhBg Keep Learning and share this channel with your friends Free Study Resources join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl Subscribe Our channel for coding, designing, hacking and computer related 👉✅ https://youtube.com/@CODEBOMBB

Friends Subscribe Our channel for coding, designing, hacking and computer related everything 👉✅ https://youtube.com/@CODEBOM
Friends Subscribe Our channel for coding, designing, hacking and computer related everything 👉✅ https://youtube.com/@CODEBOMBB