Anonymous
Ok thanks alot I start now,you are the frist one helper I am electrical power egn.
Dark
int changeBrightness(int amount)
{
for(int i = 0 ; i<Rows;i++)
for(int j = 0 ; j<Cols ; j++)
{
if(Image[i][j]>255)
{
return Image[i][j]=255;
}
Image[i][j]= amount+Image[i][j];
}
}
Dark
please help me and explain where i made mistake I am new to programming and kindly check is is this code made sense aur how to write properly?
Anonymous
Anonymous
Welcome @Sejusa
Даниил
Hello,guys.I want to call function from dll,so I download dll from server to buffer and I need to call function(like showing message box that I have exported from dll)without saving to disk.Analog is LoadLibrary and GetProcAdress,but cons of this method is that file should be located on disk.So is it possible to do it.I’ve checked a lot of forums but I can’t find solution,please help🙏
Anonymous
Anyone in here is good with RAW Sockets in c?
Anonymous
I want to add TCP Options to the Header. I looked through so many Articles in the Net and would be really happy if anyone in here can end my suffering
Hadaward 'Solly'
Anonymous
i mean maybe it would work if i would do it correctly
Anonymous
but i really think i did it correctly
Hadaward 'Solly'
i saw an article about that in the net as well but it didnt really worked
i have a similar project to do involving UDP/TCP client/servers, but I spent the whole day building automatas for a compiler maniac. I'll get back to it 10h from now. But you should try your luck in the off-topic group, cause it's more about networks in general than C.
Hadaward 'Solly'
about "doing it correctly", I also messed up the first time I made a struct for NTP. Forgot 2 32-bit fields and my message kept being labeled as malformed, but I had no idea what was wrong haha... So yeah, It happens.
Hadaward 'Solly'
I kept looking at wireshark and only noticed after 20min
Hadaward 'Solly'
#ot
Anonymous
Thank you sir
M
Hello , how can write c code to connect wifi ? I have to use dos.h ?
M
olli
I am using Kali Linux
you can have a look at nl80211 or look for APIs that are provided by the network manager used by Kali
꧁༒ 9H4WK ☬꧂
2) Using two nested do…while loops, write a program that prints out the following output. NB: The program should not have more than two loops. (8 marks)
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
꧁༒ 9H4WK ☬꧂
help me guys please
꧁༒ 9H4WK ☬꧂
what have you done so far?
#include <stdio.h>
#include <stdlib.h>
int main()
{
int row=1,column=1;
int i;
do{
i=8;
do{
i--;
}while(i>=row);
column=1;
do{
printf("*");
printf(" ");
column++;
}while(column<=row);
printf("\n");
row++;
}while(column<=6);
getch();
return 0;
}
꧁༒ 9H4WK ☬꧂
how can i use two do...while loops
Luffy
Can any one code
How to sort linkedHashMap by value using compare interface in JAVA..
NOTE: LinkedHashMap
꧁༒ 9H4WK ☬꧂
Dd
Hi
mahdi13
hi
can i compile c++ code with gcc?
Nameful
Nameful
mahdi13
M
How can I download a c headers ?
I need a networkmanager.h and I tried Linux-headers-$(uname r) but still there aren’t header of network manager
Nameful
Nameful
Usually you can find such files in something like NetworkManager-dev or NetworkManager-devel
Nameful
Depends on your distribution
M
Nameful
I installed dev let me try devel
Thanks 🙏🏻
Your distribution has either dev or devel. They're just two different conventions. If you have NetworkManager development files installed and they still can't be found you may need to specify NetworkManager's include path
M
Name
Hello everyone
Please help me to understand execve input parameters
It expects the const char* const* variable. What does the second const* mean?
Anonymous
Name
@unterumarmung thx for your help. Can you please share a related source of info for this topic?
Anonymous
olli
https://cdecl.org/ is a pretty neat when you want to translate "C gibberish" to English
const char* const* x
translates to
declare x as pointer to const pointer to const char [1]
It's especially nice for more complex types such as char (*(*x[3])())[5]
"declare x as array 3 of pointer to function returning pointer to array 5 of char"
Name
In the exercise I do we run echo %HOMEPATH% in cmd. For this purpose I wanted to do it like this
execve(“cmd”, “echo %HOMEPATH%”, NULL)
However, it seems to be incorrect as the second argument of the function limits to 1 character
Name
Anonymous
#include <stdio.h>
void main(void)
{
int menu, numb1, numb2, total;
printf("enter in two numbers -->");
scanf("%d %d", &numb1, &numb2 );
printf("enter in choice\n");
printf("1=addition\n");
printf("2=subtraction\n");
scanf("%d", &menu );
switch( menu )
{
case 1: total = numb1 + numb2;
break;
case 2: total = numb1 - numb2;
break;
default: printf("Invalid option
selected\n");
}
if( menu = = 1 )
printf("%d plus %d is %d\n",
numb1, numb2, total );
else if( menu = = 2 )
printf("%d minus %d is %d\n",
numb1, numb2, total );
}
Can you explain the output error from the text?
Roshan
#include <stdio.h>
void main(void)
{
int menu, numb1, numb2, total;
printf("enter in two numbers -->");
scanf("%d %d", &numb1, &numb2 );
printf("enter in choice\n");
printf("1=addition\n");
printf("2=subtraction\n");
scanf("%d", &menu );
switch( menu )
{
case 1: total = numb1 + numb2;
break;
case 2: total = numb1 - numb2;
break;
default: printf("Invalid option
selected\n");
}
if( menu = = 1 )
printf("%d plus %d is %d\n",
numb1, numb2, total );
else if( menu = = 2 )
printf("%d minus %d is %d\n",
numb1, numb2, total );
}
Can you explain the output error from the text?
Write == instead of = =
Xudoyberdi
#include <stdio.h>
void main(void)
{
int menu, numb1, numb2, total;
printf("enter in two numbers -->");
scanf("%d %d", &numb1, &numb2 );
printf("enter in choice\n");
printf("1=addition\n");
printf("2=subtraction\n");
scanf("%d", &menu );
switch( menu )
{
case 1: total = numb1 + numb2;
break;
case 2: total = numb1 - numb2;
break;
default: printf("Invalid option
selected\n");
}
if( menu = = 1 )
printf("%d plus %d is %d\n",
numb1, numb2, total );
else if( menu = = 2 )
printf("%d minus %d is %d\n",
numb1, numb2, total );
}
Can you explain the output error from the text?
https://pastebin.com/T1t9jPeU
Xudoyberdi
Xudoyberdi
i dont think we can use if else
Raging_bull
I think we can 😅
Roshan
Xudoyberdi
Xudoyberdi
Raging_bull
impress me
Output the same code using if else ? 😅
Xudoyberdi
Xudoyberdi
i wanna learn from you
Raging_bull
Xudoyberdi
where is if else?
Xudoyberdi
Sure😃
uh you gonna use if else over switch cases, huh?
Raging_bull
Xudoyberdi
Xudoyberdi
nays
Xudoyberdi
thanks
Roshan
Well
Roshan
I'm deleting this big mess
Anonymous
Wanna find biggest or smaller number without using and condition or loop?
Anonymous
#include<bits/stdc++.h>
  
int main ()
{
   int a = 15, b = 20;
   printf("max = %d\n", ((a + b) + abs(a - b)) / 2);
   printf("min = %d", ((a + b) - abs(a - b)) / 2);
   return 0;
}
Anonymous
try this (:
꧁༒ 9H4WK ☬꧂
#include <stdio.h>
void main(void)
{
int menu, numb1, numb2, total;
printf("enter in two numbers -->");
scanf("%d %d", &numb1, &numb2 );
printf("enter in choice\n");
printf("1=addition\n");
printf("2=subtraction\n");
scanf("%d", &menu );
switch( menu )
{
case 1: total = numb1 + numb2;
break;
case 2: total = numb1 - numb2;
break;
default: printf("Invalid option
selected\n");
}
if( menu = = 1 )
printf("%d plus %d is %d\n",
numb1, numb2, total );
else if( menu = = 2 )
printf("%d minus %d is %d\n",
numb1, numb2, total );
}
Can you explain the output error from the text?
no space between the "=="
christian
#include <stdio.h>
void main(void)
{
int menu, numb1, numb2, total;
printf("enter in two numbers -->");
scanf("%d %d", &numb1, &numb2 );
printf("enter in choice\n");
printf("1=addition\n");
printf("2=subtraction\n");
scanf("%d", &menu );
switch( menu )
{
case 1: total = numb1 + numb2;
break;
case 2: total = numb1 - numb2;
break;
default: printf("Invalid option
selected\n");
}
if( menu = = 1 )
printf("%d plus %d is %d\n",
numb1, numb2, total );
else if( menu = = 2 )
printf("%d minus %d is %d\n",
numb1, numb2, total );
}
Can you explain the output error from the text?
#include <stdio.h>
void main(void)
{
int menu, numb1, numb2, total;
printf("enter in two numbers -->");
scanf("%d %d", &numb1, &numb2 );
printf("enter in choice\n");
printf("1=addition\n");
printf("2=subtraction\n");
scanf("%d", &menu );
switch( menu )
{
case 1: total = numb1 + numb2;
break;
case 2: total = numb1 - numb2;
break;
default:
printf("Invalid optionselected\n");
}
if(menu == 1)
printf("%d plus %d is %d\n",
numb1, numb2, total );
else if(menu == 2)
printf("%d minus %d is %d\n",
numb1, numb2, total );
}
this is the correct code
Anonymous
#include <stdio.h>
void main(void)
{
int menu, numb1, numb2, total;
printf("enter in two numbers -->");
scanf("%d %d", &numb1, &numb2 );
printf("enter in choice\n");
printf("1=addition\n");
printf("2=subtraction\n");
scanf("%d", &menu );
switch( menu )
{
case 1: total = numb1 + numb2;
break;
case 2: total = numb1 - numb2;
break;
default: printf("Invalid option
selected\n");
}
if( menu = = 1 )
printf("%d plus %d is %d\n",
numb1, numb2, total );
else if( menu = = 2 )
printf("%d minus %d is %d\n",
numb1, numb2, total );
}
Can you explain the output error from the text?
Can i get the explanation from my questions
mahdi13
help please
i can't compile in vs code
error:
Include file not found in browse.path.
mahdi13