Shvmtz
Nils
Anonymous
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x;
for(x=10;x>=1;x--)
printf("%d ",x);
return 0;
}
———————————————
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x;
for(x=10;x>=1;x--)
printf("%d ",&x);
return 0;
}
———————————————--
Anyone can explain about these 2 codes? what & do in printf function?
Wisenky
Thomas shelby
#include<stdio.h>
void main()
{
    int a[6],b[6],c[]={0,0,0,0,0,0,0,0,0,0,0,0},k=6;
    printf("enter the numbers in a:");
    scanf("%d",&a);
    printf("enter the numbers in b:");
    scanf("%d",&b);
    for(int i=0;i<6;i++)
      {c[i] = a[i];
      printf("%d",c[i]);}
    for(int j=0;j<6;j++)
    {
        for(int l=0;l<6;l++)
        {
            if(c[j]!=b[l])
            {
                k++;
                c[k]=b[l];
            }
        }
        for(int m=0;m<12;m++)
            printf("\n %d",c[m]);
    }
}
Thomas shelby
I tried to write a code to merge two array and make a new distinct array
Can anyone tell me what's wrong with this code
Nils
Thomas shelby
👍
Anonymous
Write a C program that consist of structure called student with data members roll,name and GPA .Store the studnet information of 10 studnets and display the record of student in ascending order as per the gpa score.
touhou
Hanz
Anonymous
Good
I am trying to integrate the third-party shared libraries into my build for QEMUx86-64 using yocto.I can able to install the libraries and link them to the application successfully. But now the problem is whiling executing the do_rootfs command I am getting below error.
Good
Error:
Problem 1: conflicting requests
- nothing provides libc.so.6(GLIBC_2.25) needed by memstack-1.0-r0.core2_64
Problem 2: package mem-manager-1.0-r1.core2_64 requires libmemstack.so.0.1()(64bit), but none of the providers can be installed
- conflicting requests
- nothing provides libc.so.6(GLIBC_2.25) needed by memstack-1.0-r0.core2_64
Good
I added the DEPENDS on glibc in the respective third-party.bb file. But I am facing the same error, am I missing something here?
Good
third-party.bb file can be found here:https://pastebin.com/rZ6bDAsh
我是大娃
hello bodys, why use malloc > 32MB, cost much more time
我是大娃
-----------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------
BM_MORE 4404 ns 4398 ns 159684
BM_LESS 29.0 ns 29.0 ns 24110384
我是大娃
static void BM_MORE(benchmark::State& state)
{
char *s = nullptr;
const long long size = 34000000;
for (auto _ : state)
{
s = (char*)malloc(sizeof(char)*size);
free(s);
}
}
BENCHMARK(BM_MORE);
static void BM_LESS(benchmark::State& state)
{
char *s = nullptr;
const long long size = 33000000;
for (auto _ : state)
{
s = (char*)malloc(sizeof(char)*size);
free(s);
}
}
BENCHMARK(BM_LESS);
ʟᴏɴᴇᴡᴏʟꜰ
As a beginner in CSE should I start with C or C++ ?
ʟᴏɴᴇᴡᴏʟꜰ
Okay
Hanz
Woah that is understandable out of the box
バレンタインがいない柴(食用不可)
Sandeep
String ans="";
ans+="-1";
This one gives output as -1 and if I do ans+='-1';
This one gave output 1
How
ERROR
Best YouTube channel for learning DSA
Anonymous
Sandeep
Anonymous
So it leaves the 2D part?
depends on whether char is signed.
if it is signed, then this is undefined behaviour. if it is unsigned, then yes it just does a % 0x100 which leaves only the 0x31.
Anonymous
undefined behaviour -> compiler writers write compilers assuming the input code never exhibits undefined behaviour. so there is no guarantee what happens when input code does exhibit such behaviour.
Sandeep
Anonymous
Anonymous
Sandeep
Anonymous
J
👍
Subhankar
can i get a help for my tomorrow exam on competitive coding
Anonymous
Anonymous
Ist there any in depth comparison between rust and C++, all i have seen so far seemed shallow. Im struggeling to decide if its worth starting a project in rust when im mainly usually manly a c++ developer
Anonymous
Osama
Hello everyone, I'm developing an ERP system with a team and I've been searching for resources that could help us like ERP for programmers but didn't find any. All of the resources I found is focused on end users. Could someone help me? Thanks in advance.
Sandeep
.
Are there any good performance testing tools that can measure the specific call time of each function?
.
gprof. perf seems to be able to see it, but I want to compare the call time of each function of the two different versions of the program
Anonymous
Hi
Anonymous
I want to learn c language 🙂
Φ ☭
DEV 7
Why we use auto keyword in c++ with simple example
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Hello, i have been trying to complete a few program but i couldn't, i have to learn and teach those programs to my younger brother, is there anyone willing to help?
Anonymous
Anonymous
Hey guys this is to anyone that want to learn c language 🙂 so we can learn together oh if you can mentor us then we can learn from you that's good please please help your brother
Anonymous
Please you can talk to me I'm here
Ashish
Anonymous
We can learn together bro
Thomas shelby
int array[]={1,2,3,4,5,6,7,8};
#define SIZE (sizeof(array)/sizeof(int))
main()
{
if(-1<=SIZE) printf("1");
else printf("2");
}
Thomas shelby
Can anyone tell me what does if(-1<=size ).....this condition mean ???
Thomas shelby
What's exactly -1 mean???
Thomas shelby
Is it correct to declare a main fn without its return type???
Thomas shelby
Can anyone help me with this ?????