Click here to Skip to main content
15,886,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GetComputerObjectNameW Win API is failing Pin
Victor Nijegorodov18-Feb-21 20:46
Victor Nijegorodov18-Feb-21 20:46 
GeneralRe: GetComputerObjectNameW Win API is failing Pin
rajneshmalik18-Feb-21 21:47
rajneshmalik18-Feb-21 21:47 
GeneralRe: GetComputerObjectNameW Win API is failing Pin
Victor Nijegorodov18-Feb-21 22:45
Victor Nijegorodov18-Feb-21 22:45 
GeneralRe: GetComputerObjectNameW Win API is failing Pin
rajneshmalik19-Feb-21 1:01
rajneshmalik19-Feb-21 1:01 
GeneralRe: GetComputerObjectNameW Win API is failing Pin
Victor Nijegorodov19-Feb-21 3:33
Victor Nijegorodov19-Feb-21 3:33 
GeneralRe: GetComputerObjectNameW Win API is failing Pin
rajneshmalik25-Mar-21 23:27
rajneshmalik25-Mar-21 23:27 
AnswerRe: GetComputerObjectNameW Win API is failing Pin
Randor 18-Feb-21 22:43
professional Randor 18-Feb-21 22:43 
QuestionUnexpected output in array Pin
Member 1507028617-Feb-21 18:43
Member 1507028617-Feb-21 18:43 
Hi All,
//program to place even numbers in one array and odd numbers in another array
PFA code.


#include<stdio.h>
void main()
{
int array[20],array1[20],array2[20],i,n,j;

printf("enter how many array elements\n");
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&array[i]);
="" }

="" ***************even="" odd="" in="" array="" elements***************=""

for(i="0;i<n;i++)
{
" if(array[i]%2="=0)
"
="" {
="" array1[i]="array[i];//even" array
="" }
="" else
="" array2[i]="array[i];//odd"
}

="" ******************printing="" elements)*********="" for(i="0;i<n;i++)
" printf("="" even="" is:%d\n",array1[i]);="" printing="" array
}
printf("\n");
for(j="0;j<n;j++)
{

" is="" :%d\n",array2[j]);="" array
}
}
="" output="" what="" i="" got:
enter="" how="" many="" elements
5
1
2
3
4
5
="" is:1970776="" to="" avoid="" this="" is:2
="" is:-1968723210="" my="" output
="" is:4
="" is:4202864="" this

="" :1
="" Blush | :O ="" am="" getting="" :3
="" :32762="" why="" addresss="" junl="" value
="" :5

--------------------------------
process="" exited="" after="" 7.24="" seconds="" with="" return="" value="" 5
press="" any="" key="" continue="" .="" .<="" pre="">

modified 18-Feb-21 0:51am.

AnswerRe: Unexpected output in array Pin
CPallini17-Feb-21 20:22
mveCPallini17-Feb-21 20:22 
GeneralRe: Unexpected output in array Pin
Greg Utas18-Feb-21 0:02
professionalGreg Utas18-Feb-21 0:02 
GeneralRe: Unexpected output in array Pin
CPallini18-Feb-21 10:11
mveCPallini18-Feb-21 10:11 
Questioncode analysis Pin
Member 1507028614-Feb-21 20:29
Member 1507028614-Feb-21 20:29 
AnswerRe: code analysis Pin
Richard MacCutchan14-Feb-21 22:16
mveRichard MacCutchan14-Feb-21 22:16 
GeneralRe: code analysis Pin
Member 1507028615-Feb-21 22:57
Member 1507028615-Feb-21 22:57 
AnswerRe: code analysis Pin
Greg Utas15-Feb-21 0:52
professionalGreg Utas15-Feb-21 0:52 
GeneralRe: code analysis Pin
Member 1507028615-Feb-21 23:02
Member 1507028615-Feb-21 23:02 
Questioncallbacks in c Pin
Member 1506971810-Feb-21 5:16
Member 1506971810-Feb-21 5:16 
AnswerRe: callbacks in c Pin
Greg Utas10-Feb-21 5:34
professionalGreg Utas10-Feb-21 5:34 
AnswerRe: callbacks in c Pin
k505410-Feb-21 6:35
mvek505410-Feb-21 6:35 
QuestionFunction similar to printf for software UART, without the need for a large temporary buffer? Pin
arnold_w8-Feb-21 11:20
arnold_w8-Feb-21 11:20 
AnswerRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
Mircea Neacsu8-Feb-21 12:00
Mircea Neacsu8-Feb-21 12:00 
GeneralRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
arnold_w9-Feb-21 7:39
arnold_w9-Feb-21 7:39 
GeneralRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
Mircea Neacsu9-Feb-21 8:22
Mircea Neacsu9-Feb-21 8:22 
AnswerRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
CPallini8-Feb-21 20:11
mveCPallini8-Feb-21 20:11 
GeneralRe: Function similar to printf for software UART, without the need for a large temporary buffer? Pin
arnold_w9-Feb-21 8:04
arnold_w9-Feb-21 8:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.