int main() {
int a[2][2] = { 1, 2, 3, 4 };
printf( "%ld %ld\n", a + 1 , *(a + 1));
return 0;
}
It gives the output
140734762639080 140734762639080
Type: Posts; User: lsme
int main() {
int a[2][2] = { 1, 2, 3, 4 };
printf( "%ld %ld\n", a + 1 , *(a + 1));
return 0;
}
It gives the output
140734762639080 140734762639080
[QUOTE=R.Stiltskin]
char c;
char *pc = &c;
unsigned short s = 0;
char *ps = (char*)&s;
unsigned long l = 0;
char *pl = (char*)&l;
if(infile.is_open()) {
Thanks. Quantum, bob. This idea will work i think. let me try this. once again thanks.
-thankyou
I am facing one problem in my office. We are having one pc connection with a serial port device ( HSM ) which is used by one applicaton. It is working fine. Now we are using one more application to...
Thanks
:D
Hi,
Can we create thread inside a thread ?. If i create a thread inside another thread , What will happen ?. :confused: :confused:
yes. I am working as a root user. it is working in same pc.
when i mount that dir and try to create link from different pc, it is not working. One more think is , i could create files, dir, etc.
Hi,
I have a problem in my office.
We are using Samba server. To connect with that server we did not use smbclient. Instead of the client we mount the samba server directory in my local...
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdio.h>
#define MAX_IFS 64
Try this programe.
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
#include <arpa/inet.h>
>Even if you use strcpy(), you still have a problem - temp is only 5 >chars, and "HELLO" needs at least 6 chars (remember the \0)
In C , We need not define the sizeof("Hello")+1 array size.
...
Try in this link. It has a simple and good posix thread tutorial
POSIX Thread Tutorial
you have defined a two dimentional integer array with one row and 11 columns.
Array index starts from 0 to <arraymax
so, you should use store[0][j] instead of store[1][j]
/*Inverses.c*/...
You should use the function pthread_join(&pthread_t) to make the main function to wait for the thread to finish. Since you are passing structure that is local to main, The main function should finish...
I want to list all the users who are currently logged in my system using c program. I am using linux 7.1 . I don't know how to do it. Can any one help me about this?.
Thanks